Inno Setup Reading file in Ansi and Unicode encoding

梦想的初衷 提交于 2019-11-28 11:36:48

First, note that the Unicode is not an encoding. The Unicode is a character set. Encoding is UTF-8, UTF-16, UTF-32 etc. So we do not know which encoding you actually use.


In the Unicode version of Inno Setup, the LoadStringsFromFile function uses the current Windows Ansi encoding by default.

But, if the file has the UTF-8 BOM, it will treat the contents accordingly. The BOM is a common way to autodetect the UTF-8 (and other UTF-*) encoding. You can create a file in the UTF-8 encoding with BOM using Windows Notepad.

UTF-16 or other encodings are not supported natively.

For implementation of reading UTF-16 file, see Inno Setup Pascal Script - Reading UTF-16 file.

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