------=_NextPart_000_0229_01C258D0.89076400
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
I'm a new user of PostgreSQL. I wrote the following statement to compare 2 =
Chinese words if they are the same :
SELECT '=B6=C0'=3D'=A7=F5';
=20
(
For those who cannot read Chinese, can use the following statement :=20
SELECT (chr(182) || chr(192))=3D(chr(167) || chr(245));
)
=20=20
I expected it will return false to me, but it return true.=20
Can anyone help me to solve this? Thx.
oclam
------=_NextPart_000_0229_01C258D0.89076400
Content-Type: text/html;
charset="big5"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dbig5" http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi,<BR> <BR>I'm a new user of PostgreSQL. I wrote =
the=20
following statement to compare 2 Chinese words if they are the same=20
:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2> SELECT '=B6=C0'=3D'=A7=F5';<BR> <BR>(<BR>&nb=
sp; For=20
those who cannot read Chinese, can use the following statement=20
: <BR> SELECT (chr(182) ||=
=20
chr(192))=3D(chr(167) || chr(245));<BR>)<BR> <BR>I expected it will r=
eturn=20
false to me, but it return true. </FONT></DIV>
<DIV><FONT size=3D2>Can anyone help me to solve this? Thx.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>oclam</FONT></DIV></BODY></HTML>
------=_NextPart_000_0229_01C258D0.89076400--
------=_NextPart_000_00B2_01C2597F.D427EC20
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable
Is there anything needed to be set in the database?=20
The database return TRUE when I execute the following statement :
SELECT chr(182)=3Dchr(167);
But it return FALSE if I changed the statement to:
SELECT chr(182)=3Dchr(100);
I've try to change the database encoding to 'EUC_TW', 'LATIN1', and 'WIN'. =
However, the problem still exists.
Any suggestion on what I can do?
----- Original Message -----=20
From: wlj=20
To: oclam=20
Sent: Wednesday, September 11, 2002 9:16 AM
Subject: Re: [GENERAL] Compare chinese words
i try it in japanese,i got the result that you wanted.
----- Original Message -----=20
From: oclam=20
To: pgsql-...@postgresql.org=20
Sent: Tuesday, September 10, 2002 1:46 PM
Subject: [GENERAL] Compare chinese words
Hi,
=20=20=20=20=20
I'm a new user of PostgreSQL. I wrote the following statement to compar=
e 2 Chinese words if they are the same :
SELECT '=B6=C0'=3D'=A7=F5';
=20=20=20=20=20
(
For those who cannot read Chinese, can use the following statement =
:=20
SELECT (chr(182) || chr(192))=3D(chr(167) || chr(245));
)
=20=20=20=20=20=20
I expected it will return false to me, but it return true.=20
Can anyone help me to solve this? Thx.
oclam
------=_NextPart_000_00B2_01C2597F.D427EC20
Content-Type: text/html;
charset="big5"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dbig5" http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Is there anything needed to be set in the database?=20
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>The database return TRUE when I execute the=
=20
following statement :</FONT></DIV>
<DIV><FONT size=3D2> SELECT chr(182)=3Dchr(167);</FONT></=
DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>But it return FALSE </FONT><FONT size=3D2>if&=
nbsp;I=20
changed the statement to:</FONT></DIV>
<DIV><FONT size=3D2> SELECT chr(182)=3Dchr(100);</FONT></=
DIV>
<DIV> </DIV>
<DIV>I've try to change the database encoding to 'EUC_TW', 'LATIN1', and 'W=
IN'.=20
However, the problem still exists.</DIV>
<DIV>Any suggestion on what I can do?</DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0p=
x; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt =B7s=B2=D3=A9=FA=C5=E9">----- Original Message -=
---- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt =B7s=B2=D3=A9=FA=C5=E9; font-col=
or: black"><B>From:</B>=20
<A href=3D"mailto:wul...@neusoft.com" title=3Dwu...@neusoft.com>wlj</A=
> </DIV>
<DIV style=3D"FONT: 10pt =B7s=B2=D3=A9=FA=C5=E9"><B>To:</B> <A href=3D"ma=
ilto:oc....@innoage.com"=20
title=3Doc...@innoage.com>oclam</A> </DIV>
<DIV style=3D"FONT: 10pt =B7s=B2=D3=A9=FA=C5=E9"><B>Sent:</B> Wednesday, =
September 11, 2002 9:16=20
AM</DIV>
<DIV style=3D"FONT: 10pt =B7s=B2=D3=A9=FA=C5=E9"><B>Subject:</B> Re: [GEN=
ERAL] Compare chinese=20
words</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3D"MS UI Gothic" size=3D2>i try it in japanese,i got the=
=20
result that you wanted.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt MS UI Gothic">----- Original Message ----- </D=
IV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt MS UI Gothic; font-color: blac=
k"><B>From:</B>=20
<A href=3D"mailto:oc....@innoage.com" title=3Doc...@innoage.com>oclam<=
/A>=20
</DIV>
<DIV style=3D"FONT: 10pt MS UI Gothic"><B>To:</B> <A=20
href=3D"mailto:pgsql-...@postgresql.org"=20
title=3Dpgsql...@postgresql.org>pgsql-...@postgresql.org</A> <=
/DIV>
<DIV style=3D"FONT: 10pt MS UI Gothic"><B>Sent:</B> Tuesday, September =
10,=20
2002 1:46 PM</DIV>
<DIV style=3D"FONT: 10pt MS UI Gothic"><B>Subject:</B> [GENERAL] Compar=
e=20
chinese words</DIV>
<DIV><BR></DIV>
<DIV><FONT size=3D2>Hi,<BR> <BR>I'm a new user of PostgreSQL. I wr=
ote the=20
following statement to compare 2 Chinese words if they are the same=20
:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2> SELECT '=B6=C0'=3D'=A7=F5';<BR> <BR>(<BR=
> =20
For those who cannot read Chinese, can use the following statement=20
: <BR> SELECT (chr(182) =
||=20
chr(192))=3D(chr(167) || chr(245));<BR>)<BR> <BR>I expected it wi=
ll=20
return false to me, but it return true. </FONT></DIV>
<DIV><FONT size=3D2>Can anyone help me to solve this? Thx.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>oclam</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY>=
</HTML>
------=_NextPart_000_00B2_01C2597F.D427EC20--