Re: Opening a text file that may be ASCII *or* Unicode
- From: Andrew Aronoff <NOSPAM_WRONG.ADDRESS@xxxxxxxxx>
- Date: Fri, 17 Jun 2005 16:41:56 +0200
Excellent observation! VBS appears to do manage internal strings in
Unicode. I didn't know that.
My question, then, should be rephrased as follows:
1. Can you confirm that opening with TriStateUseDefault will convert
ASCII to Unicode whenever possible?
2. If my strategy will work, *why* does it work? Just how does
TriStateUseDefault work?
Do you agree now, at least, with my questions? ;-)
Thanks for your help.
regards, Andy
"Miyahn" <HQF03250@xxxxxxxxxxx> wrote:
>"Andrew Aronoff" wrote in message news:vd44b1do6aumjtv8ocl1298ppeed4836ne@xxxxxxx
>> >> 1. Can you confirm that opening with TriStateUseDefault will convert the
>> >> Unicode to ASCII whenever possible?
>> >No. Not at all.
>>
>> Except that's what I'm seeing. The Unicode file opened with
>> TriStateUseDefault is comparing perfectly with plain ASCII stored in
>> the script.
>
>I think that 'plain ASCII stored in the script' isn't 'plain ASCII'.
>
>Try this.
>
>strASCII = "abc"
>For I = 1 To LenB(strASCII)
> Buf = Buf & " " & Right("0" & Hex(AscB(MidB(strASCII, I, 1))), 2)
>Next
>MsgBox Mid(Buf, 2)
--
**********
Please send e-mail to: usenet (dot) post (at) aaronoff (dot) com
To identify everything that starts up with Windows, download
"Silent Runners.vbs" at www.silentrunners.org
**********
.
- References:
- Opening a text file that may be ASCII *or* Unicode
- From: Andrew Aronoff
- Re: Opening a text file that may be ASCII *or* Unicode
- From: Andrew Aronoff
- Re: Opening a text file that may be ASCII *or* Unicode
- From: Miyahn
- Re: Opening a text file that may be ASCII *or* Unicode
- From: Andrew Aronoff
- Re: Opening a text file that may be ASCII *or* Unicode
- From: Miyahn
- Opening a text file that may be ASCII *or* Unicode
- Prev by Date: Re: Getting Printer Mac address?
- Next by Date: select case and sub routines
- Previous by thread: Re: Opening a text file that may be ASCII *or* Unicode
- Next by thread: Re: Opening a text file that may be ASCII *or* Unicode
- Index(es):
Relevant Pages
|
Loading