Unicode strings

Giganews Newsgroups
Subject: Unicode strings
Posted by:  Alexander Mueller (miller…@hotmail.com)
Date: Thu, 01 May 2008

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

Replies