Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 34A0C633B75 for ; Tue, 12 Jan 2010 19:49:11 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 10171-09 for ; Tue, 12 Jan 2010 23:48:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mail.postgresql.org (Postfix) with ESMTP id F31E9633A6C for ; Tue, 12 Jan 2010 19:48:58 -0400 (AST) Received: by fxm27 with SMTP id 27so46530fxm.3 for ; Tue, 12 Jan 2010 15:48:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=LWi/+L/sThCA5x3C8gGLUrznV1Y1MOh7yEyYrfRNel8=; b=syPTbyCGeTaYTVVI5VxOKoCcWx8nrAMNWBQb4rIV9iarGzG4JR1bbThtZxltOGkXp0 pSgxj7BDpkZe/eTrrrdAjzwvlv90SngwqLouW2hdcpGFkFxv2Ieab7qvlaCp+BKV21+h k5b52fA81aRvf1c9ZJ5x6UjbCWxDa+BX1U0hk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=AdN4N2iEI7xPwmoxRzjH+29pNJP4Wnb9SPdRt2Nzwk/cggkq5lQWljYCeoF4GSBlQq rt478I8gM23p5P71A3g+V4sH4G7VAxkXuwUl22J7LXVihdNnPheQMU+Djaz2KG/Oz9WM pR7Zw5VywBbGSNKuBjMyeFo0ShEpfBsnv059E= MIME-Version: 1.0 Received: by 10.86.235.16 with SMTP id i16mr461095fgh.28.1263340136629; Tue, 12 Jan 2010 15:48:56 -0800 (PST) Date: Tue, 12 Jan 2010 18:48:56 -0500 Message-ID: <22431f1b1001121548q64dcdeb0j3e0aed7b69e8336a@mail.gmail.com> Subject: unicode vs non-unicode ODBC driver From: the6campbells To: pgsql-odbc@postgresql.org Content-Type: multipart/alternative; boundary=001485eb00a4130879047d004c1f X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.591 tagged_above=-10 required=5 tests=BAYES_00=-2.599, FH_DATE_PAST_20XX=3.188, HTML_MESSAGE=0.001, UPPERCASE_50_75=0.001 X-Spam-Level: X-Archive-Number: 201001/5 X-Sequence-Number: 10168 --001485eb00a4130879047d004c1f Content-Type: text/plain; charset=ISO-8859-1 Consider a simple scenario. CREATE DATABASE "TEST1" WITH OWNER = postgres ENCODING = 'WIN1252' LC_COLLATE = 'English, United States' LC_CTYPE = 'English, United States' CONNECTION LIMIT = -1; CREATE TABLE z ( c1 character(6) ) If you invoke sqlColumns the data type returned from the column changes depending on if you used the UNICODE or non-UNICODE driver. This is with the 8.04.01 driver. Get Data All: "TABLE_QUALIFIER", "TABLE_OWNER", "TABLE_NAME", "COLUMN_NAME", "DATA_TYPE", "TYPE_NAME", "PRECISION", "LENGTH", "SCALE", "RADIX", "NULLABLE", "REMARKS", "COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH", "ORDINAL_POSITION", "IS_NULLABLE", "DISPLAY_SIZE", "FIELD_TYPE", "AUTO_INCREMENT", "PHYSICAL NUMBER", "TABLE OID", "BASE TYPEID" "TEST1", "public", "z", "c1", 1, "bpchar", 6, 6, , , 1, "", , 1, , 12, 1, , 6, 1042, 0, 1, 45819, 0 1 row fetched from 24 columns. Get Data All: "TABLE_QUALIFIER", "TABLE_OWNER", "TABLE_NAME", "COLUMN_NAME", "DATA_TYPE", "TYPE_NAME", "PRECISION", "LENGTH", "SCALE", "RADIX", "NULLABLE", "REMARKS", "COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH", "ORDINAL_POSITION", "IS_NULLABLE", "DISPLAY_SIZE", "FIELD_TYPE", "AUTO_INCREMENT", "PHYSICAL NUMBER", "TABLE OID", "BASE TYPEID" "TEST1", "public", "z", "c1", -8, "bpchar", 6, 12, , , 1, "", , -8, , 12, 1, , 6, 1042, 0, 1, 45819, 0 1 row fetched from 24 columns. --001485eb00a4130879047d004c1f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Consider a simple scenario.

CREATE DATABASE "TEST1"
=A0=A0WITH OWNER =3D po= stgres
=A0=A0 =A0 =A0 ENCODING =3D 'WIN1252'
= =A0=A0 =A0 =A0 LC_COLLATE =3D 'English, United States'
=A0=A0 =A0 =A0 LC_CTYPE =3D 'English, United States'
=A0=A0 =A0 =A0 CONNECTION LIMIT =3D -1;

CREA= TE TABLE z
(
=A0=A0c1 character(6)
)

If you invoke sqlColumns the data type returned from the column change= s depending on if you used the UNICODE or non-UNICODE driver. This is with = the 8.04.01 driver.

Get Data All:
"TABLE_QUALIFIER", "TABLE_OWNER", "TABLE_NAME"= ;, "COLUMN_NAME", "DATA_TYPE", "TYPE_NAME", &= quot;PRECISION", "LENGTH", "SCALE", "RADIX&qu= ot;, "NULLABLE", "REMARKS", "COLUMN_DEF", &qu= ot;SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENG= TH", "ORDINAL_POSITION", "IS_NULLABLE", "DISP= LAY_SIZE", "FIELD_TYPE", "AUTO_INCREMENT", "P= HYSICAL NUMBER", "TABLE OID", "BASE TYPEID"
"TEST1", "public", "z", "c1", = 1, "bpchar", 6, 6, <Null>, <Null>, 1, "", &= lt;Null>, 1, <Null>, 12, 1, <Null>, 6, 1042, 0, 1, 45819, 0<= /div>
1 row fetched from 24 columns.


Get Data All:
"TABLE_QUALIFIER", "TABLE_OWNER&quo= t;, "TABLE_NAME", "COLUMN_NAME", "DATA_TYPE",= "TYPE_NAME", "PRECISION", "LENGTH", "SC= ALE", "RADIX", "NULLABLE", "REMARKS", &q= uot;COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB&quo= t;, "CHAR_OCTET_LENGTH", "ORDINAL_POSITION", "IS_N= ULLABLE", "DISPLAY_SIZE", "FIELD_TYPE", "AUTO= _INCREMENT", "PHYSICAL NUMBER", "TABLE OID", "= ;BASE TYPEID"
"TEST1", "public", "z", "c1", = -8, "bpchar", 6, 12, <Null>, <Null>, 1, "",= <Null>, -8, <Null>, 12, 1, <Null>, 6, 1042, 0, 1, 45819,= 0
1 row fetched from 24 columns.
--001485eb00a4130879047d004c1f--