Archive: ` character in double-byte text


` character in double-byte text
Has anyone found a good way to deal with the ` character that is legitamtely contained in some double-byte ansi text for asian languages?

It seems problematic, because a lot of the String/Word macros use
Push `${STRING}`
This will cause an error, and using ' works, but that can cause an error if you have English text that contains an apostraphe.

Thanks.


If it's used in your local language, it shouldn't be a problem because it'll be skipped. If it's not, it's usually in a LangString containing translations for a specific string. If you push the LangString, there should be no problem with quoting because the parser only sees the LangString. Where did bump into this problem?


I'm not currenlty using LangString--I'm using !defines and referencing those values in my script. I ran into the problem trying to pass a Chinese string through StrNSISToIO (in StrFunc.nsh), which uses ` to Push and Pop like most header macros do.

I'll look into using LangString and see if that gets around the problem.


So you're using switches everywhere to get the right language for every string or is it single-language script?


No, I'm using separate language files and then just including the one I need to at build time (build is language-specific). I know NSIS is geared towards creating generic builds that can change language at runtime, but I've had no problems with my old-fashioned approach until this problem arose, which I can get around but was looking for the most efficient way to do so.


I thought about defining something for double-bytes at build time and modifying some string macros to alter the Push syntax based on that define, but I think it's simpler and safer to use LangString for those rare cases where a string contains ` , and then reference the LangString in my script instead of the language file define.

Thanks Kichik!