[ECPG] Characters set, w_char & co ...

Поиск
Список
Период
Сортировка
От SC
Тема [ECPG] Characters set, w_char & co ...
Дата
Msg-id 10055061.78537.1225031462456.JavaMail.www@wwinf2215
обсуждение исходный текст
Список pgsql-novice
Hi all !

I'm wondering how charset should ba handled when using embedded C, in particular regarding to memory allocation.

I mean my database is currently using UTF-8, and I successfully inserted (by using pgAdminIII) chinese characters in it.

My question is : in my C code, lets say my table has a 'name' column (let's say VARCHAR(50)), shall I declare :

EXEC SQL BEGIN DECLARE SECTION
w_char    pg_name[50];

or char pg_name[50*4];

or char pg_name[50*2]; ?

When stating VARCHAR[X], X specifies the charactr count, right (not the byte count used for encoding) ?

I've been told about iconv() but not sure what suits the best.

An idea anyone ?

Thank you !

BR

SC

В списке pgsql-novice по дате отправления:

Предыдущее
От: "G. J. Walsh"
Дата:
Сообщение: Re: combining tables
Следующее
От: Cliff Nieuwenhuis
Дата:
Сообщение: Re: combining tables