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

Commit976a456

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 parent1350059 commit976a456

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.15 2000/05/20 13:12:26 ishii Exp $
9+
* $Id: conv.c,v 1.15.2.1 2000/11/17 04:53:54 ishii Exp $
1010
*
1111
*
1212
*/
@@ -906,15 +906,22 @@ mic2euc_tw(unsigned char *mic, unsigned char *p, int len)
906906
{
907907
len-=pg_mic_mblen(mic++);
908908

909-
if (c1==LC_CNS11643_1||c1==LC_CNS11643_2)
909+
if (c1==LC_CNS11643_1)
910910
{
911911
*p++=*mic++;
912912
*p++=*mic++;
913913
}
914+
elseif (c1==LC_CNS11643_2)
915+
{
916+
*p++=SS2;
917+
*p++=0xa2;
918+
*p++=*mic++;
919+
*p++=*mic++;
920+
}
914921
elseif (c1==0x9d)
915922
{/* LCPRV2? */
916923
*p++=SS2;
917-
*p++=c1-LC_CNS11643_3+0xa3;
924+
*p++=*mic++-LC_CNS11643_3+0xa3;
918925
*p++=*mic++;
919926
*p++=*mic++;
920927
}
@@ -941,7 +948,7 @@ big52mic(unsigned char *big5, unsigned char *p, int len)
941948
unsigned shortbig5buf,
942949
cnsBuf;
943950
unsignedcharlc;
944-
charbogusBuf[2];
951+
charbogusBuf[3];
945952
inti;
946953

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp