Re: Unicode strings

Giganews Newsgroups
Subject: Re: Unicode strings
Posted by:  mayayana (mayaXXyana…
Date: Thu, 1 May 2008

Someone else may know more, but maybe this
will help:

  VB uses unicode internally but shows you
an ANSI version. That probably doesn't matter
for what you're doing.
  But Japanese is a DBCS (MBCS?) language,
so some bytes are escape characters that define
the next byte. It's not a 1-to-1 correspondence
between characters and bytes. I don't know
how that would affect reading the string on an
English PC. Maybe you need to find documentation
for the escape characters and deal with them?
It's possible that you just can't deal with a
Japanese-language string without the Japanese

  Virtually all VB code that relates to language seems
to have been written by Michael Kaplan. He also used
to write articles for VBPJ. You might find info. by
searching for his name with "vb".

> Hi all,
> i have a dual/scriptable VB-6 ActiveX-DLL that
> receives file names from its clients.
> The file names sometimes contain unicode characters
> (or maybe its MBCS?, most of the time the src is japanese)
> in which case the component will not find the file and stop
> processing.
> The strings are passed correctly
> in from the clients (mostly JScript/WSH).
> Is there a way to get the proper filename out of the BSTR?
> I heard VB has its ways of handling/converting the
> BSTR as ASCII/8-bit, even it "is" Unicode, making every
> char a '?' that is greater ASCII 255.
> Also I heard the string isn't actually changed to ASCII but rather
> treated as ASCII (so that the src strng-data is preserved).
> Any hints?
> Thanks and bye,
> Alex



In response to

Unicode strings posted by Alexander Mueller on Thu, 01 May 2008