hitwhzhongqiu / unsis

Automatically exported from code.google.com/p/unsis
0 stars 0 forks source link

MakeNSIS does not output unicode #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It seems like makensis does a conversion to char* at some point, a simple 
UTF16LE .nsi with some non-ascii characters do not make it all the way from 
input to output without a conversion that corrupts it.

Test script:
!echo "ĦĔĹĽΘ ŴØŖĿĎ" ;I don't know if the issue tracker can handle 
this so I also attached the script
!error AbortTest

Output from makensis.exe test.nsi:
--snipped--
Processing script file: "test.nsi"
????? ?╪??? (test.nsi:1)
!error: AbortTest
--snipped--

type test.nsi shows the correct output.

cmd.exe is running with a true type font (Lucida Console). I also tried running 
chcp 65001 first but that did not help...

Original issue reported on code.google.com by ander...@users.sourceforge.net on 11 Mar 2012 at 8:21

Attachments:

GoogleCodeExporter commented 9 years ago
The problem is not with makensis but with cmd.exe. The cmd.exe can't really 
handle Unicode. You have to use makensisw.exe to see the Unicode output.

Original comment by j...@scratchpaper.com on 12 Mar 2012 at 3:21

GoogleCodeExporter commented 9 years ago
Saying the console cannot handle Unicode is simply not true, it cannot handle 
RTL and things that require Uniscribe but it can display a lot of the BMP.

See http://i39.tinypic.com/2guxjrp.png

See also: Anyone who says the console can't do Unicode isn't as smart as they 
think they are: http://blogs.msdn.com/b/michkap/archive/2010/04/07/9989346.aspx

Original comment by ander...@users.sourceforge.net on 13 Mar 2012 at 12:42

GoogleCodeExporter commented 9 years ago
It looks like you are right it looks like WriteConsoleW is your friend. I will 
have to take a look to see how to best fit it into the code. I'll keep this 
issue open and consider it for the next release.

Original comment by j...@scratchpaper.com on 13 Mar 2012 at 1:09