For Masters Only - ASP, Component, and Unicode

J

JJY

I have a component that returns a BSTR string from a method.

The funny thing is that I have a test.vbs file which instantiates the
component, calles a method, and writes the returned string into a unicode
file with OpenTextFile() with -1 for unicode. I can view the double byte
characters in Internet Browser fine, but when I open the file in binary
mode, it doesn't seem like the file is in unicode format because I don't see
a whole bunch of 00's. If I do "Save As" on the file, the file shows that
the encoding is unicode.

Now, if I make the same call in ASP and save the returned string into a
file, again with -1 for OpenTextFile(), the most of double byte characters
are gone and I see only spaces in a lot of places. Numbers seems to come in
properly. This file is saved in unicode because I see a whole bunch of
00's. If I do "Save As" on the file, the file shows that the encoding is
unicode.

I need to do this in ASP, using VBScript.

Help! I am absolutely clueless on this one. I don't know where it begins
and ends here.

Thanks.
J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top