Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8a35ac2

Browse files
committed
Fix bugs in EUC_TW support. This fix includes patches contributed
by Chih-Chang Hsi. See "A Patch for MIC to EUC_TW code converting inmb support" posting in pgsql-patches list dated 09 Nov 2000.
1 parentafde2ac commit8a35ac2

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎src/backend/utils/mb/conv.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* WIN1250 client encoding support contributed by Pavel Behal
77
* SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya
88
*
9-
* $Id: conv.c,v 1.20 2000/10/30 10:40:28 ishii Exp $
9+
* $Id: conv.c,v 1.21 2000/11/17 04:42:10 ishii Exp $
1010
*
1111
*
1212
*/
@@ -538,15 +538,22 @@ mic2euc_tw(unsigned char *mic, unsigned char *p, int len)
538538
{
539539
len-=pg_mic_mblen(mic++);
540540

541-
if (c1==LC_CNS11643_1||c1==LC_CNS11643_2)
541+
if (c1==LC_CNS11643_1)
542542
{
543543
*p++=*mic++;
544544
*p++=*mic++;
545545
}
546+
elseif (c1==LC_CNS11643_2)
547+
{
548+
*p++=SS2;
549+
*p++=0xa2;
550+
*p++=*mic++;
551+
*p++=*mic++;
552+
}
546553
elseif (c1==0x9d)
547554
{/* LCPRV2? */
548555
*p++=SS2;
549-
*p++=c1-LC_CNS11643_3+0xa3;
556+
*p++=*mic++-LC_CNS11643_3+0xa3;
550557
*p++=*mic++;
551558
*p++=*mic++;
552559
}
@@ -573,7 +580,7 @@ big52mic(unsigned char *big5, unsigned char *p, int len)
573580
unsigned shortbig5buf,
574581
cnsBuf;
575582
unsignedcharlc;
576-
charbogusBuf[2];
583+
charbogusBuf[3];
577584
inti;
578585

579586
while (len>0&& (c1=*big5++))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp