Bug 319583 (MONO76760) - I18N.CJK.CP949 can't decode UHC Level 2 correctly
Summary: I18N.CJK.CP949 can't decode UHC Level 2 correctly
Status: RESOLVED FIXED
Alias: MONO76760
Product: Mono: Class Libraries
Classification: Mono
Component: CORLIB (show other bugs)
Version: 1.1
Hardware: Other All
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: easy_fix, I18N, patch
Depends on:
Blocks:
 
Reported: 2005-11-19 17:50 UTC by Hye-Shik Chang
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:38:40 UTC


---- Reported by perky@FreeBSD.org 2005-11-19 10:50:50 MST ----

(I'm the author of the module)

I18N.CJK.CP949 codec can't decode characters on UHC Level 2
for CP949 encoding due to invalid codepoint calculation on
KoreanEncoding:GetChars.  This was a sort of no brainer copy &
paste bug. :-)  Sorry for the mistake.


--- CP949.cs.orig       2005-11-19 23:25:02.921875000 +0900
+++ CP949.cs    2005-11-19 23:52:48.812500000 +0900
@@ -172,7 +172,7 @@
                     else
                         c1 = (char)0;
                 } else if (useUHC && lastByte <= 0xC6 && b < 0xa1) { //
UHC Level 2
-                    int ord = 14532 + (lastByte - 0x81) * 84;
+                    int ord = 14532 + (lastByte - 0xA1) * 84;

                     if (b >= 0x41 && b <= 0x5A)
                         ord += b - 0x41;



---- Additional Comments From atsushi@ximian.com 2005-11-20 19:03:19 MST ----

Patch applied (r53294). Please don't hesitate to post patches at
anytime :-) Thanks.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Every platforms</cf_op_sys_details>