Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
866 views
in Technique[技术] by (71.8m points)

unicode - Is it safe to use .islu translation files in Inno Setup for all languages?

I'm using Inno Setup for my open source project WinSCP.
So far I'm generating Inno Setup .isl translation files from our project-specific translation files (particularly to translate CustomMessages section).

But the .isl's need to be converted to ANSI encoding. There's a problem with ANSI encoding for languages that does not have an ANSI encoding at all (like Hindi or Armenian) or whose ANSI encoding is limited (like Romanian).

I see that core Inno Setup translations for some languages use .islu extension, (probably) indicating that the contents is UTF-8 encoded. I can also see in the Inno Setup source code that the .islu's are used in Unicode version of Inno Setup only. That's ok, as I'm using Unicode version only.

But I did not find any mention of .islu in documentation.

Is it OK if I generate just .islu's for all languages? Is there any drawback (apart from inability to use the ANSI version of Inno Setup)?

Or should I keep using .isl for languages with good ANSI encoding, and use .islu just for selected languages?

I'd obviously prefer the first to simplify the process.


Also what LanguageCodePage should be set to for .islu? The official Nepali translation uses 0. Not sure if that's a general rule for .islu or it's because Nepali does not have an ANSI encoding.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

After few months of using this, I can confirm that adding the UTF-8 BOM and using the .islu extension for all Inno Setup translations seems to work well.


The .islu files are documented since Inno Setup 5.5.9:

If no code page currently exists for the language, set LanguageCodePage to 0, use a special .islu extension for the language's file, and encode this file as Unicode. Note: this makes your language file unusable by Non Unicode Inno Setup so only do this if really needed. Also note: a LanguageName setting in a .islu file does not need to use the special "<nnnn>" encoding mentioned above.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...