Article ID: 272138 - Last Review: May 11, 2006 - Revision: 3.0 PRB: Negative Integers Do Not Work as Unicode HTML Entity References
This article was previously published under Q272138 On This PageSYMPTOMS
Some functions, such as the Microsoft Visual Basic (VB) and Visual Basic Script (VBScript) AscW function, may return a negative number when you ask for the Unicode value of a non-Latin character (such as Chinese Hanzi, Japanese Kanji or Korean Hangul). When you use this negative number as an HTML entity reference (&#nnnn, where nnnn is either a hexadecimal or decimal Unicode number), you see the entity reference as literal text, instead of the corresponding non-Latin character.
CAUSE
Unicode numbers occupy a 16-bit positive range from 0 to 65535 (0xFFFF), and cannot be negative.
RESOLUTION
When AscW returns a negative number, it returns the twos complement form of that number. To convert the twos complement notation into normal binary notation, add 0xFFF to the return result. For an example, see the "More Information" section.
MORE INFORMATIONSteps to Reproduce Behavior
REFERENCESFor more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites: http://msdn.microsoft.com/ie/
(http://msdn.microsoft.com/ie/)
http://support.microsoft.com/iep (http://support.microsoft.com/iep) APPLIES TO
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






















Back to the top