Announcement

Collapse
No announcement yet.

NSIS 3.08 Can't compile NSIS with Chinese annotations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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

    Comment


    • #3
      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.

      Comment


      • #4
        Originally Posted by Royallie
        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.


        nsis-2.46.5-Unicode-setup.exe

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎