![]() |
#1 |
Junior Member
Join Date: Mar 2020
Posts: 8
|
FileWrite utf-8
Hello,
I am building a Unicode installer. I need to write utf-8 to a file. I have searched far and wide an conducted many experiments. FileWrite in https://nsis.sourceforge.io/Docs/Chapter4.html#fileinst states that “(If you are building a Unicode installer, the function converts the string to ANSI/MBCS. The system default ANSI codepage (ACP) is used during the conversion)”. How do I set the system default ANSI codepage?, neither ‘chcp 65001’ [the windows utf-8 code page] before running ‘makensis’ nor while running the installer works. I have a utf-8 with ʙᴏᴍ .nsi script. with: FileOpen $9 '$INSTDIR\test.txt' w FileWrite $9 "AÖ• |
![]() |
![]() |
![]() |
#2 |
Junior Member
Join Date: Mar 2020
Posts: 8
|
Posting the following Unicode char https://www.compart.com/en/unicode/U+1F604 into you forum broke it and truncated my post.
Hello, I am building a Unicode installer. I need to write utf-8 to a file. I have searched far and wide an conducted many experiments. FileWrite in https://nsis.sourceforge.io/Docs/Chapter4.html#fileinst states that “(If you are building a Unicode installer, the function converts the string to ANSI/MBCS. The system default ANSI codepage (ACP) is used during the conversion)”. How do I set the system default ANSI codepage?, neither ‘chcp 65001’ [the windows utf-8 code page] before running ‘makensis’ nor while running the installer works. I have a utf-8 with ʙᴏᴍ .nsi script. with: FileOpen $9 '$INSTDIR\test2.txt' w FileWrite $9 "AÖ•B" FileClose $9 The file test2.txt ends up with (hex dump): 41 d6 95 42 A..B Any help much appreciated, Gene Thomas. |
![]() |
![]() |
![]() |
#3 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
https://nsis.sourceforge.io/Unicode_...version_plugin
or http://forums.winamp.com/showthread.php?t=454258 IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Tags |
filewrite, unicode |
Thread Tools | Search this Thread |
Display Modes | |
|
|