Archive: Trouble Reading UTF-8 files on Japanese 2003 Server fails....


Trouble Reading UTF-8 files on Japanese 2003 Server fails....
Hi all,

i amtrying to read a bunch of files using:


FileOpen $R0 "$EXEDIR\file.txt" r
${IFNOT} ${Errors}
${DO}
FileRead $R0 $R1
DetailPrint "-$R1-"

${LOOPUNTIL} $R1 == ""
${ENDIF}
FileClose $R0


These files are generated as UTF-8 files on a Japanese Version of Windows 2003 Server (Standard).

I am using Unicode NSIS and if i convert the files to ANSI i can read them just fine. I tried using the Unicode plugin (http://nsis.sourceforge.net/Unicode_plug-in) to convert the files but it would always give me a "2" Error, wrong Unicode Type specified.

I am looking for other ways to either read the file(s) directly or convert them to ANSI....

Thanks in advance for your help.

x

There is a unicode version of FileRead, FileReadUTF16LE. Maybe convert the files to UTF16(see if it works), then try with FileReadUTF16LE. I'm just guessing.


I stumbled across the *UTF16LE commands but they would mess up when reading UTF-8 files. I get one character per line then :)

I am now in the process of creating workarounds for Windows Server 2003 Japanese systems....