Skip site navigation (1) Skip section navigation (2)

A Patch for MIC to EUC_TW code converting in mb support

From: Chih-Chang Hsieh <cch(at)cc(dot)kmu(dot)edu(dot)tw>
To: pgsql-patches(at)postgresql(dot)org
Subject: A Patch for MIC to EUC_TW code converting in mb support
Date: 2000-11-09 02:12:10
Message-ID: 3A0A07FA.129ED448@cc.kmu.edu.tw (view raw or flat)
Thread:
Lists: pgsql-docspgsql-hackerspgsql-patches
============================================================================

POSTGRESQL BUG REPORT: MIC to EUC_TW code converting in mb support
============================================================================

System Configuration
---------------------
  Architecture (example: Intel Pentium)         :x86
  Operating System (example: Linux 2.0.26 ELF)  :Linux 2.2.x and FreeBSD
3.5R
  PostgreSQL version (example: PostgreSQL-7.0)  :PostgreSQL-7.0.2
  Compiler used (example:  gcc 2.8.0)           :egcs-2.91.66, gcc 2.7.3

A FULL description of the problem:
------------------------------------------------
In PostgreSQL mb (multi-byte) support, there is a bug in code converting

for MIC to EUC_TW. Original mic2euc_tw() in conv.c converts CNS
11643-1992
Plane 2 into 2 bytes EUC_TW encoding. But characters in CNS 11643-1992
Plane 2
should be converted into 4 bytes EUC_TW encoding instead.

A way to repeat the problem:
----------------------------------------------------------------------
When you initdb with -E EUC_TW and set PGCLIENTENCODING to BIG5,
you will find all the characters in CNS 11643-1992 Plane 2 are
incorrectly stored or output.

This problem might be fixed by the solution in the attachement.


Attachment: mic2euc_tw-patch
Description: text/plain (513 bytes)

Responses

pgsql-docs by date

Next:From: Tatsuo IshiiDate: 2000-11-09 04:43:25
Subject: Re: A Patch for MIC to EUC_TW code converting in mb support
Previous:From: Ross J. ReedstromDate: 2000-11-06 17:14:18
Subject: Re: Re: FAQ update for 7.1

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-11-09 02:56:00
Subject: Re: unreachable block
Previous:From: Limin LiuDate: 2000-11-09 01:58:01
Subject: unreachable block

pgsql-patches by date

Next:From: Bruce MomjianDate: 2000-11-09 04:15:56
Subject: Re: Patch to fix installed location dependency in AIX
Previous:From: Zeugswetter Andreas SBDate: 2000-11-08 14:33:07
Subject: Patch to fix installed location dependency in AIX

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group