store and retrieve 2 bytes charactors

Поиск
Список
Период
Сортировка
От Kathy Zhu
Тема store and retrieve 2 bytes charactors
Дата
Msg-id 200304172118.h3HLIIN16636@amon.Central.Sun.COM
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How foreign key info is stored
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Strange query optimization in 7.3.2