Re: How to write Binary data using VBScript?
- From: "Joe Earnest" <jearnest3-SPAM@xxxxxxxxxxxxx>
- Date: Sat, 4 Jun 2005 10:10:44 -0600
Hi again,
[interlineated]
"mayayana" <mayaXXyana1a@xxxxxxxxxxxxxxxx> wrote in message
news:itioe.13737$M36.2495@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> There was an interesting article linked from Eric
> Lippert's article, about the history of character
> encoding:
>
> http://www.joelonsoftware.com/articles/Unicode.html
>
> (Joel Spolsky. He's another one from the Dave Barry
> school of technical writing.)
Actually, the "stuff" at the outset is just commercial "screaming". In the
marketplace, it's common to "scream" for attention with terribly
over-emphasized remarks, whether dire or humorous.
Once past that, a remarkably good article -- thanks for the reference. It's
goes beyond my prior understanding of how unicode developed.
BTW, did you notice from the that the little resume on the left that the
author was the "keynote speaker at ... the Cold Fusion developer
conference." ;-)
>
> It explains a lot about the variations in encoding
> but doesn't get into much detail about specific
> languages.
> In VB and VBA in a Nutshell, under Chr, it says that
> "Chr returns the character associated with an ASCII or ANSI
> character code." Chr seems to have no problem with
> unused values, like 141 through 144 in English.
> So it seems that having an internationalized version
> of Textstream binary would only require creating
> workarounds for operator characters on DBCS systems -
> recognizing when those numeric values come through
> and dealing with them accordingly.
>
Yes, but -- all string values in VB and VBS are internally stored in 2-byte
unicode, based on the page code. This creates a pitfall for non-English
128+ characters, so storage in a string (even a transitory string) needs to
be avoided. I believe that the Chr function has to create a transitory
string to hand the character back to the calling script.
> Of course it would be much easier to just use a component,
> but the ability to use Textstream for binary adds lots of
> new abilities that are then universal to WSH, rather than
> just shared between a few people.
>
>
Works for me in my local scripts. Again, however, I think that Lippert
would say that American English code pages are not "universal".
Regards,
Joe Earnest
.
- Follow-Ups:
- Re: How to write Binary data using VBScript?
- From: mayayana
- Re: How to write Binary data using VBScript?
- From: Joe Earnest
- Re: How to write Binary data using VBScript?
- References:
- Re: How to write Binary data using VBScript?
- From: Christoph Basedau
- Re: How to write Binary data using VBScript?
- From: mayayana
- Re: How to write Binary data using VBScript?
- From: Joe Earnest
- Re: How to write Binary data using VBScript?
- From: mayayana
- Re: How to write Binary data using VBScript?
- From: Joe Earnest
- Re: How to write Binary data using VBScript?
- From: mayayana
- Re: How to write Binary data using VBScript?
- Prev by Date: Re: How to write Binary data using VBScript?
- Next by Date: Extracting text from a string in ASP
- Previous by thread: Re: How to write Binary data using VBScript?
- Next by thread: Re: How to write Binary data using VBScript?
- Index(es):
Relevant Pages
|