How to support other languages in Azure blob storage?

淺唱寂寞╮ 提交于 2019-12-25 13:22:07

问题


I am developing a web application by using ASP.NET/ C# and AZURE. I am using Azure Blob to store files. I face a problem to store a file with other languages(Only English is OK).

Example: I save this as a .txt file :"한나라당 전당대회 돈 봉투 사건을 수사하고 있는 검찰이 박희태 국회의장 비서관 사무실을 전격 압수수색했습니다. 조정만, 이봉건 두 수석 비서관실과 여비서 함모 씨가 근무하는 부속실입니다. 서울중앙지검 공안1부는 오늘(19일) 아침 8시 20분 서울 여의도"

but when I retrive this, its shows: "한나ë¼ë‹¹ ì „ë‹¹ëŒ€íšŒ ëˆ ë´‰íˆ¬ ì‚¬ê±´ì„ ìˆ˜ì‚¬í•˜ê³ ìžˆëŠ” ê²€ì°°ì´ ë°•í¬íƒœ 국회ì˜ìž¥ 비서관 ì‚¬ë¬´ì‹¤ì„ ì „ê²© 압수수색했습니다. ì¡°ì •ë§Œ, ì´ë´‰ê±´ ë‘ ìˆ˜ì„ ë¹„ì„œê´€ì‹¤ê³¼ 여비서 함모 씨가 근무하는 ë¶€ì†ì‹¤ìž…니다. 서울중앙지검 공안1부는 오늘(19ì¼) 아침 8시 20ë¶„ 서울 ì—¬ì˜ë„"

What is the problem ?

Thanks
Nahid


回答1:


You have to save your text files in UTF format (not ASCII).

UPDATE after @naruse comment

And you have to specify the content type property for the blob including the charset. I do that for cyrillic alphabet and it works perfectly. There shall not be issues with Korean one.

If it is a plain text file, the proper value for Content Type should be:

text/plain; charset=utf-8

Or the charset you naturally use.



来源:https://stackoverflow.com/questions/8968585/how-to-support-other-languages-in-azure-blob-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!