Re: How to read UTF-8 chars using VBA



VB uses Unicode internally. Hence, you have to convert the UTF-8 to Unicode
when loading it into the VB app. Controls generally use the current ANSI
code page rather than Unicode but the translation from Unicode will happen
transparently - you don't have to do it yourself. If the characters are not
appearing then it may be that those characters are not part of your current
ANSI code page. What locale are you using, and what characters are you
trying to display?

Tony Proctor

"MSK" <mannaikarthik@xxxxxxxxx> wrote in message
news:1165318371.806846.303470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks, but that code converts the UTF-8 chars into Unicode,again I am
losing the required chars, actually I want to show those special chars
as it is in the list box.

MSK.

Tony Proctor wrote:
Here's a link to some code that reads UTF-8 encoded data into a VB app:

http://groups.google.ie/group/microsoft.public.vb.general.discussion/msg/00f3c3fd8182563e?hl=en&;

Tony Proctor

"MSK" <mannaikarthik@xxxxxxxxx> wrote in message
news:1165312983.479419.100970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.




.



Relevant Pages

  • [PATCH] UTF-8 input: composing non-latin1 characters, and copy-paste
    ... One can put the keyboard driver into Unicode mode, load a Unicode keymap, and get single keystrokes generate valid UTF-8 for non-ASCII characters. ...
    (Linux-Kernel)
  • Re: Unicode string libraries
    ... UTF-8 is the encoding that must be used ... I initially thought that the variable-length characters ... but also that UTF-8 didn't break when Unicode got extended ...
    (comp.programming)
  • Re: Unicode string libraries
    ... I know that Perl uses UTF-8 as its internal string representation. ... characters defined within the BMP). ... search on UTF-8 encodings is equivalent to a search on Unicode ... it makes sense to choose other criteria for your internal encoding. ...
    (comp.programming)
  • RE: Encoding query - Ansi
    ... Saving as text won't remove the control characters. ... produced via an OLE, they are unicode files. ... way i can do this is to resave the text files with ansi encoding. ...
    (microsoft.public.excel.programming)
  • Re: Fast UTF-8 strlen function
    ... >> Is there a fast UTF-8 string length function floating around? ... Length in bytes, or length in characters? ... For UTF-8, the main basic "change" you have to make to your string routines ... then I could individually look up the characters in my UNICODE ...
    (alt.lang.asm)

Loading