Re: How to write Binary data using VBScript?



Hi Joe,

Well, if you liked the last one, how about ....

[interspersed]

"mayayana" <mayaXXyana1a@xxxxxxxxxxxxxxxx> wrote in message
news:JM6oe.13465$M36.3017@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>
>> [interlineated]
>
> Oooh. That's a nice word. I've never seen it before.

Habit, not necessarily vocabulary. Used a lot in editing.

>
>>
>> It certainly arises with any 2-byte ANSI or unicode text.
>>
>> The impression I had was that the issue arises with some code pages, even
>> with single-byte 128+ characters, because of the way the code page
>> handles
>> the character. Lippert's main point was that, with text techniques, you
>> can't avoid code-page handling issues.
>>
> He specifically referred to it as a DBCS problem, though.
> I'm no expert on programming for different languages, but I think
> the way it works is that for Western Hemisphere languages,
> in general, 1 byte is enough to get all the characters, and as
> long as it's one byte ANSI there should be no problems. The
> Chr function will deal with it. His example was only showing that
> in some cases on a DBCS system, a single byte is actually
> functioning as a kind of operator rather than as a character,
> and that therefore the Chr function will produce unexpected
> results. Aside from that kind of issue, text still is just bytes, after
> all.
>

I concur.

> I was realizing after my last post, though, that part of what
> was bugging me about the writing style of that article is that Eric
> Lippert is writing from an emotional point of view. It's understandable
> that he identifies with VBS as "his baby", but it's nevertheless
> problematic as well. His piece on FSO for binary had a
> protective and possessive attitude at its root, using screwball
> statements like "Please don't do it." (a moral directive!) and "it
> doesn't work" (false), instead of just clearly explaining the issue.
>

Nice catch.

One of my favorite areas. Human written language is a lot richer and more
fun than computer "languages", and face-to-face spoken language is even
richer, with all the inflections and facial and body gestures. We tell each
other what is really important to us, by gestures, inflections, phrases, and
implicit or explicit metaphors, even while discoursing on another level or
within logical strictures. The fatal problem for all the curious strain of
logicians who have tried to turn language into tokenized logic, is that the
primary use of language is *not* to convey abstract information, but to
establish social ties and recognition of boundaries, need and trust.
Language wasn't created (50,000 years ago or so) for conveying abstract
information, and has never been used primarily for that reason. Ambiguity
is good -- it's the only way that a personal view of one person can be
adopted by another person with a different perspective. Conveyance of
abstract information is a tiny fraction of the use of language -- of course,
when communication of abstract information is required, it needs to be done
well.

You'd enjoy philosophical linguistic analysis. Here's a biggie word --
"Hermeneutics". Don't expect a decent dictionary definition. Began in the
18th century as scriptural analysis. Developed in Germany in France in the
19th and early 20th centuries as a way of philosophically analyzing historic
data, and by the latter part of that period, modern philosophical argument.
It's a cornerstone of post-modernism, and has been there merged with the
English-Austrian analytic linguistic philosophy of Wittgenstein, Ayers, et
al. and psychological concepts (unfortunately, primarily either Freudian or
Jungian, not Jamesian or modern pragmatic).

In areas that have meaning (philosophy, science, social concerns, theology,
etc.), the modern analytic linguistic (or much more so, and with a twist,
post-modern) approach is first to analyze the "presentation" or "document"
in the course of the "conversation" for the unstated presumptions, needs,
goals, etc., or more fundamentally, the bedrock "origin" concepts, on the
basis that all speech is *human* speech involving *human* aspects, even when
abstracted or guided by logic. The trick at this level is to balance the
unstated (or, more correctly, not explicitly stated, which in post-modernism
can be obtained through historical sources outside the "document") versus
the stated. This is the point where much of the controversy over the
alleged "absolute relativism" of post-modernism occurs (which the new Pope
has recently raised again on the world stage with regard to scriptural
interpretation).

Ah, but I might have digressed a bit.

I have no concept of what it's like to work inside MS. One could conjecture
that the fact that VBS is not going forward, could, from a purely MS
corporate approach, not be a feather in Lippert's cap, however unfair or
misguided that may be. At the very least, he no longer has the opportunity
to correct things that he sees as potentially leading to problems.

> (Isn't this the same guy who got inexplicably worked up
> over the issue of "Set x = Nothing" a couple of months ago,
> saying adamantly that it *shouldn't* be used? I remember
> having a debate about that here.)
>

I missed that one. (I was away from the NG for about 9 months or so.) I'll
go back and look for it. Of couse, the "Nothing" keyword(?) is thoroughly
unnecessary, but I can't imagine why it could cause a problem. That should
be an interesting thread.

> By the end of his piece it's clear that using FSO for binary
> bothers him, but it's not clear exactly what the limitations are.
> I would expect that it won't be a problem in any European language.
> It may even only require minimal workarounds in Japanese, but I
> suspect that Eric is not going to tell us if that's the case. :)
>
> It would be interesting to hear from people using other languages.
> On the other hand, can a Japanese system even use a script
> written in English? Do they use Anglicized characters to write
> out FileSystemObject, or do they have a Japanese version
> of SCRRUN.DLL? Can an English script run on a German or
> French system without editing? I don't know. Another interesting
> question (for which I have no idea of the answer) is what percentage
> of foreign language Windows users are using an English code page
> for convenience?
>
> I have several scripts on my site that use Textstream binary
> to get File Version information and extract icons, among other
> things. So far I haven't heard from anyone who's had trouble with
> them, but I don't know how many of my visitors are actually
> scripting in something other than English.
>
>

>From Lippert's broad-MS perspective (I further dangerously presume), VBS is
used on websites that might well be accessed by people using other code
pages, or for far-flung networks. When used one place, it's copied and
imported into another place, and so on ... It would be far nicer, from that
perspective, to not have local code-page issues.

Regards,
Joe Earnest


.



Relevant Pages


Loading