Old 23rd February 2022, 08:54   #1
wangzl23
Junior Member
 
Join Date: Feb 2022
Posts: 3
Red face NSIS 3.08 Can't compile NSIS with Chinese annotations

NSIS 3.08 Compile NSIS Script with Chinese annotations,

I have tried some Chinese comment text can be compiled, some Chinese comments can not be compiled, for example: "步"

The first line can be compiled, the second line will report an error.

All script:
code:

# 使用 Modern 风格界面 那种下一
# 步
Name "test"



Processing script file: "D:\Installation\test.nsi" (ACP)
Bad text encoding: D:\Installation\test.nsi:2
Error in script "D:\Installation\test.nsi" on line 2 -- aborting creation process
wangzl23 is offline   Reply With Quote
Old 23rd February 2022, 11:04   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,524
Save .nsi file as UTF-8 with BOM or UTF-16 with BOM (Unicode in Notepad).

The compiler reads and validates each line before processing comments. This is perhaps a design flaw but it is tricky to fix.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 24th February 2022, 01:48   #3
wangzl23
Junior Member
 
Join Date: Feb 2022
Posts: 3
Smile

Quote:
Originally Posted by Anders View Post
Save .nsi file as UTF-8 with BOM or UTF-16 with BOM (Unicode in Notepad).

The compiler reads and validates each line before processing comments. This is perhaps a design flaw but it is tricky to fix.
thank you. I saved it in Notepad as UTF-8 with BOM and compiled it successfully.
It's a weird thing.
wangzl23 is offline   Reply With Quote
Old 24th February 2022, 02:01   #4
wangzl23
Junior Member
 
Join Date: Feb 2022
Posts: 3
Quote:
Originally Posted by Royallie View Post
is it even possible?
Yes, you can try to save the above three lines of script as utf-8 format, compile with NSIS 3.08, it will report an error.

In addition, I can compile the same script with nsis-2.46.5-unicode.

https://www.scratchpaper.com/announc...-46-5-released
nsis-2.46.5-Unicode-setup.exe
wangzl23 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump