store and retrieve 2 bytes charactors - Mailing list pgsql-general

From Kathy Zhu
Subject store and retrieve 2 bytes charactors
Date
Msg-id 200304172118.h3HLIIN16636@amon.Central.Sun.COM
Whole thread Raw
List pgsql-general
Hi All,

I have a problem of storing and retrieving jp chars.

I have installed 7.2.1 with multibyte enabled.

The server encoding is SQL_ASCII.
The database jpdb's encoding is EUC_JP.

I have a test file that reads values (origVal) from Localization_jp.properties,
store them into db and retrieve them (as dbVal).

The value I tried is . It means "explanation" in English, which is 2 chars in
Japanese.

(String) origVal.length = 2;
(String) dbVal.length = 2;

but
origVal.equals(dbVal) = false.

I don't know what I need to do in order to be able to store and retrieve the
same string back.

What is missing ??
What are the minimal steps needed to store 2 bytes.

thanks!!
kathy


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How foreign key info is stored
Next
From: Tom Lane
Date:
Subject: Re: Strange query optimization in 7.3.2