Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Asger Jørgensen
Sat, 22 Sep 2007 23:29
UTF-16 are killing me, please help
Author: Asger Jørgensen
Date: Sat, 22 Sep 2007 23:29
Date: Sat, 22 Sep 2007 23:29
28 lines
1556 bytes
1556 bytes
Hi there I have tryed and tryed, but with no luck. I have some files in Unicode mostly UTF-8 and with them I have no trouble. But the UTF-16 files are making me loo my last to hair For UTF-8 I use TMemoryStream->LoadFromFile and then MultiByteToWideChar and WideCharToMultiByte learned here in the NG and it works grat. When I load a UTF-16 file into the TMemoryStream it is totaly crap. I have a hex editor and when I open the same file in that the first to bytes are FF and FE the next is the first real character in the file < after that a 0 ? 0 x and so on everything looks as expected. I realy hope sombody have an example on how to read a UTF-16 plain text file Thanks in advance Asger
Re: UTF-16 are killing me, please help (Solved)
Author: Asger Jørgensen
Date: Sun, 23 Sep 2007 10:29
Date: Sun, 23 Sep 2007 10:29
10 lines
1235 bytes
1235 bytes
Hi there As it turned out, it was the wrong type of files I was trying to read I was opening some *.xls files instead of *.xsl. The files I was opening is binary file, not for me ;-) Sory to have waste Your time.. Kind regards Asger
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads