Bugzilla – Bug 319583
I18N.CJK.CP949 can't decode UHC Level 2 correctly
Last modified: 2007-09-15 21:24:06 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>