Hi,
I am currently developing some Word templates (office 2003) + VBA
I have a UTF-8 encoded text file...I wanted to read and show the
values into a list box...
The charactors are getting changed while reading and filling the
control...(but in the text file they are perfect)
I tried FSO and Open statement with Line input.. I dont know how to
Convert into normal chars..
How to resovle.. ?
Its bit urgent...give me some useful links
Many thanks.
MSK.
Klaus Linke - 05 Dec 2006 17:10 GMT
The built-in list box does not support Unicode.
Haven't tried any, but this post has some pointers to Unicode-enabled
replacements:
http://www.thescripts.com/forum/thread555700.html
Regards,
Klaus
> Hi,
>
[quoted text clipped - 15 lines]
> Many thanks.
> MSK.
Tony Jollans - 06 Dec 2006 19:46 GMT
There are other ways I'm sure, but try this to get you going:
Dim File ' As ADODB.Stream
Set File = CreateObject("ADODB.Stream")
File.Open
File.Type = 2 ' adTypeText
File.Charset = "UTF-8"
File.LoadFromFile "C:\path\file.etc"
myString = File.ReadText
File.Close
It should work as is with late binding or you can early bind with a
reference to Microsoft ActiveX Data Objects 2.5 or later, and use the
commented bits.

Signature
Enjoy,
Tony
> Hi,
>
[quoted text clipped - 15 lines]
> Many thanks.
> MSK.