Bug:MutiByteToWideChar returns incorrect Unicode characters using code page 50225

Article ID: 960293 – Last Review: November 19, 2008 – Revision: 1.0

Bug:MutiByteToWideChar returns incorrect Unicode characters using code page 50225

Source: Microsoft Support

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

MutiByteToWideChar can return incorrect Unicode characters using code page 50225 (ISO-2022-KR).

Cause

The ISO-2022-KR designator sequence, ESC $ ) C, identifies a sequence of bytes as being encoded according to the encoding ISO-2022-KR. It is to appear only once in a line before any Korean KSX1001-1992 characters. To shift between one and two-byte mode, Shift In and Shift Out characters are used. However, our implementation of MultiByteToWideChar applied to the encoding ISO-2022-KR, code page 50225, treats the designator sequence as a shift sequence.  This problem also affects other ISO-2022 encodings such as ISO-2022-JP.

Resolution

The preferred work around is to use Unicode.  If using Unicode is not an option then you could use MLang’s ConvertStringToUnicode method.

DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.


APPLIES TO
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Home Basic
  • Windows Vista Ultimate
  • Windows Vista Home Premium
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP 64-Bit Edition Version 2003
Keywords: 
kbnomt kbrapidpub KB960293

 

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image