Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 22nd February 2013, 10:16   #1
xbarns
Senior Member
 
xbarns's Avatar
 
Join Date: Aug 2007
Location: Frankfurt, Germany
Posts: 187
Trouble Reading UTF-8 files on Japanese 2003 Server fails....

Hi all,

i amtrying to read a bunch of files using:


code:
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
xbarns is offline   Reply With Quote
Old 22nd February 2013, 17:53   #2
bnicer
Senior Member
 
Join Date: Feb 2005
Location: London
Posts: 218
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.
bnicer is offline   Reply With Quote
Old 24th February 2013, 19:03   #3
xbarns
Senior Member
 
xbarns's Avatar
 
Join Date: Aug 2007
Location: Frankfurt, Germany
Posts: 187
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....
xbarns 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