Re: Unicode strings

Giganews Newsgroups
Subject: Re: Unicode strings
Posted by:  Dean Earley (dean.earl…@icode.co.uk)
Date: Thu, 01 May 2008

Alexander Mueller wrote:
> 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).

They ARE Unicode internally, and will remain so, unless passed to a non
Unicode interface like windows API calls.
If you are just using the internal VB functions, then you shouldn't have
a problem, as long as it is passed to your app correctly.
For us to help further, can you tell us where the string is coming from
(in detail) and what you are passing it to internally.

The ??? you see are only down to the font in use not handling that
character, but it is still a full Unicode string.

--
Dean Earley (dean.earl…@icode.co.uk)
i-Catcher Development Team

iCode Systems

Replies

In response to

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