Re: [Q] UTF-8 testing with Windows/ODBC 8.3.0400

Поиск
Список
Период
Сортировка
От V S P
Тема Re: [Q] UTF-8 testing with Windows/ODBC 8.3.0400
Дата
Msg-id 1237518056.23587.1306371731@webmail.messagingengine.com
обсуждение исходный текст
Ответ на Re: [Q] UTF-8 testing with Windows/ODBC 8.3.0400  (Hiroshi Inoue <inoue@tpf.co.jp>)
Ответы [Q] unixODBC and Unicode (2byte vs 4 byte)  ("V S P" <toreason@fastmail.fm>)
Список pgsql-odbc
thank you,
I have a follow up:

I if I declare a field as varchar(30)
in the UTF-8 Postgres, I assume it can possibly be more than 30 bytes
storage.


so when I set the ODBCs (unicode version)  'max long varchar'
am I setting it to max 'byte length' of the UTF-8 (as in the dabase)
or to '60' (max number of bytes for 30 character string in UTF-16)
or to '30' (max number of valid characters) ?


And would your answer be the same for the unix Odbc version ?


Thank you again for the response,
Vlad



On Thu, 19 Mar 2009 21:28 +0900, "Hiroshi Inoue" <inoue@tpf.co.jp>
wrote:
> V S P wrote:
> > Hi thank you for the follow up.
> > Just had a break through...
>
> <snip>
>
> > Three things that I am not still sure about, and may be you can help:
> >
> > a) does Posgtres driver on unixODBC do the same as Windows (that is
> > there is a unicode and non unicode versions of the drivers ?
> > (I am interested in 64 bit linux and 64 bit freebsd ones)
> >
> > b) I noticed that when using the Unicode version (first) and
> > Ascii version (second) the value of SWORD right before SQLVLEN is
> > different
> > (it is 12 on the ascii and -9 on unicode version) -- what does this
> > mean?
>
> It's the SQL data type. 12 means SQL_VARCHAR and -9 means SQL_WVARCHAR.
>
> > disp_otrq_x86d  8a4-b90 EXIT  SQLDescribeColW  with return code 0
> > (SQL_SUCCESS)
> >         HSTMT               013F1BA8
> >         UWORD                       11
> >         WCHAR *             0x01A28974 [       9] "cntr_data"
> >         SWORD                      512
> >         SWORD *             0x01A28BC4 (9)
> >         SWORD *             0x01A28BB8 (-9)
> >         SQLULEN *           0x01A28B94 (4096)
> >         SWORD *             0x01A28BA0 (0)
> >         SWORD *             0x01A28B88 (1)
> >
> >
> > disp_otrq_x86d  ab8-498 EXIT  SQLDescribeColW  with return code 0
> > (SQL_SUCCESS)
> >         HSTMT               013F1C38
> >         UWORD                       11
> >         WCHAR *             0x01A28974 [       9] "cntr_data"
> >         SWORD                      512
> >         SWORD *             0x01A28BC4 (9)
> >         SWORD *             0x01A28BB8 (12)
> >         SQLULEN *           0x01A28B94 (4096)
> >         SWORD *             0x01A28BA0 (0)
> >         SWORD *             0x01A28B88 (1)
>
> > another  question:  I have about 6 tables where about 20 fields in each
> > table,
> > 2 fields are 65K long (they are declared as varchar(65000) is this is OK
> > for ODBC drivers, and what if anything I should be setting on them?
>
> 65K may be OK if you set the max long varchar size > 65000 but please
> note that most applications/middlewares have their own limitation.
> For example the limitation of MS Access is around 65000 AFAIR.
>
> regards,
> Hiroshi Inoue
--
  V S P
  toreason@fastmail.fm

--
http://www.fastmail.fm - A fast, anti-spam email service.


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

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: [Q] UTF-8 testing with Windows/ODBC 8.3.0400
Следующее
От: "V S P"
Дата:
Сообщение: [Q] unixODBC and Unicode (2byte vs 4 byte)