Re: CAtlRegExp crashes with pound sign!
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 09/15/04
- Next message: Igor Tandetnik: "Re: Encrypting a file (*not* the usual stuff)"
- Previous message: Igor Tandetnik: "Re: General COM question"
- In reply to: Patty O'Dors: "Re: CAtlRegExp crashes with pound sign!"
- Next in thread: Simon Trew: "Re: CAtlRegExp crashes with pound sign!"
- Reply: Simon Trew: "Re: CAtlRegExp crashes with pound sign!"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 09:38:57 -0400
"Patty O'Dors" <PattyODors@discussions.microsoft.com> wrote in message
news:F47EB0F6-D687-4E90-A897-60F392B13358@microsoft.com
> The pound sign is in my experience the only common character that
> causes unicode beef. Presumably it's because we're considered
> 'foreign'.
No, it's because it has an Ascii code in the upper half of the table
(above 0x7F). When this code is treated as signed char, it becomes
negative. When cast to a larger type, it gets sign-expanded and turned
into a very large unsigned value. Read about sign expansion in your
favorite C or C++ textbook.
This would happen to any character in the upper Ascii, not just a pound
sign. Try A or or ¿, for example.
--
With best wishes,
Igor Tandetnik
"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage
- Next message: Igor Tandetnik: "Re: Encrypting a file (*not* the usual stuff)"
- Previous message: Igor Tandetnik: "Re: General COM question"
- In reply to: Patty O'Dors: "Re: CAtlRegExp crashes with pound sign!"
- Next in thread: Simon Trew: "Re: CAtlRegExp crashes with pound sign!"
- Reply: Simon Trew: "Re: CAtlRegExp crashes with pound sign!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|