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
Есть вопросы? Напишите нам!
✖
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.