pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feed08.02.04.00 Updating column with Unicode
7+ messages / 2 participants
[nested] [flat]
* 08.02.04.00 Updating column with Unicode
@ 2011-04-03 11:50 Josef Springer <Josef.Springer@joops.com>
0 siblings, 1 reply; 7+ messages in thread
From: Josef Springer @ 2011-04-03 11:50 UTC (permalink / raw)
To: pgsql-odbc
Hello everybody,
I have detected some strange behavior updating columns with Unicodes
strings.
Environment:
PostgreSQL 8.2.5
Database encoding: UTF8
ODBC: PostgreSQL Unicode Version 08.02.04.00
I am updating via ODBC a column (character varying nnn) of a record to
an unicoded string.
Updating by using the command as one parameterblock
'UPDATE adresse SET company = ''Seifert und Partner KG EUR ??'' WHERE id
= 1'
works right. (the whole parameterblock is encoded to UTF8)
Updating the record by using the command 'UPDATE adresse SET company=?
WHERE record.id=?'
and providing the arguments for ? UTF8-encoded in an extra buffer
destroys the columns content.
If i update the column with an UTF8 encoded character in the default
range (the EURO Sign EUR), it works.
Can anybody give me some hints ?
mit freundlichen Grüßen / best regards,
Josef Springer
(Geschäftsleitung/Management)
Postal
Address
_Josef.Springer@joops.com_
Orlando-di-Lasso Str. 2
D-85640 Putzbrunn
Phone
Office
+49 (0)89 600 6920
Phone Fax
+49 (0)89 600 69220
Web
Web
http://www.joops.com
JOOPS
(HRB München 86239)
*-- the software company --*
Attachments:
Postal.jpg (image/jpeg, 770B) download
view image
Phone.jpg (image/jpeg, 802B) download
view image
Web.jpg (image/jpeg, 807B) download
view image
Image120.jpg (image/jpeg, 7.6K) download
view image
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: 08.02.04.00 Updating column with Unicode
@ 2011-04-04 13:18 Hiroshi Inoue <inoue@tpf.co.jp>
parent: Josef Springer <Josef.Springer@joops.com>
0 siblings, 1 reply; 7+ messages in thread
From: Hiroshi Inoue @ 2011-04-04 13:18 UTC (permalink / raw)
To: Josef Springer <Josef.Springer@joops.com>; +Cc: pgsql-odbc
(2011/04/03 20:50), Josef Springer wrote:
> Hello everybody,
>
> I have detected some strange behavior updating columns with Unicodes
> strings.
>
> Environment:
> PostgreSQL 8.2.5
> Database encoding: UTF8
> ODBC: PostgreSQL Unicode Version 08.02.04.00
>
> I am updating via ODBC a column (character varying nnn) of a record to
> an unicoded string.
>
> Updating by using the command as one parameterblock
> 'UPDATE adresse SET company = ''Seifert und Partner KG € 文件'' WHERE id
> = 1'
> works right. (the whole parameterblock is encoded to UTF8)
>
> Updating the record by using the command 'UPDATE adresse SET company=?
> WHERE record.id=?'
> and providing the arguments for ? UTF8-encoded in an extra buffer
> destroys the columns content.
>
> If i update the column with an UTF8 encoded character in the default
> range (the EURO Sign €), it works.
>
> Can anybody give me some hints ?
How do you bind the parameters?
regards,
Hiroshi Inoue
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: 08.02.04.00 Updating column with Unicode
@ 2011-04-04 13:47 Josef Springer <Josef.Springer@joops.com>
parent: Hiroshi Inoue <inoue@tpf.co.jp>
0 siblings, 1 reply; 7+ messages in thread
From: Josef Springer @ 2011-04-04 13:47 UTC (permalink / raw)
To: Hiroshi Inoue <inoue@tpf.co.jp>; +Cc: pgsql-odbc
Hi Hiroshi,
the parameters are bound as an UTF8-encoded bytearray. Because the
interface is controlled by a Smalltalk application, i think the codings
does not help you:
/bytes := v asByteArrayEncoding: #'utf-8'.
p copyAt: 0 from: bytes size: (size := bytes size) startingAt: 1.
p at: size put: 0
/
Josef Springer
Hiroshi Inoue wrote:
> (2011/04/03 20:50), Josef Springer wrote:
>> Hello everybody,
>>
>> I have detected some strange behavior updating columns with Unicodes
>> strings.
>>
>> Environment:
>> PostgreSQL 8.2.5
>> Database encoding: UTF8
>> ODBC: PostgreSQL Unicode Version 08.02.04.00
>>
>> I am updating via ODBC a column (character varying nnn) of a record to
>> an unicoded string.
>>
>> Updating by using the command as one parameterblock
>> 'UPDATE adresse SET company = ''Seifert und Partner KG € 文件'' WHERE id
>> = 1'
>> works right. (the whole parameterblock is encoded to UTF8)
>>
>> Updating the record by using the command 'UPDATE adresse SET company=?
>> WHERE record.id=?'
>> and providing the arguments for ? UTF8-encoded in an extra buffer
>> destroys the columns content.
>>
>> If i update the column with an UTF8 encoded character in the default
>> range (the EURO Sign €), it works.
>>
>> Can anybody give me some hints ?
>
> How do you bind the parameters?
>
> regards,
> Hiroshi Inoue
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: 08.02.04.00 Updating column with Unicode
@ 2011-04-05 03:38 Hiroshi Inoue <inoue@tpf.co.jp>
parent: Josef Springer <Josef.Springer@joops.com>
0 siblings, 1 reply; 7+ messages in thread
From: Hiroshi Inoue @ 2011-04-05 03:38 UTC (permalink / raw)
To: Josef Springer <Josef.Springer@joops.com>; +Cc: pgsql-odbc
Hi Josef,
(2011/04/04 22:47), Josef Springer wrote:
> Hi Hiroshi,
>
> the parameters are bound as an UTF8-encoded bytearray. Because the
> interface is controlled by a Smalltalk application, i think the codings
> does not help you:
> /bytes := v asByteArrayEncoding: #'utf-8'.
> p copyAt: 0 from: bytes size: (size := bytes size) startingAt: 1.
> p at: size put: 0
> /
Unfortunately I know nothing about Smalltalk.
Anyway *Unicode* means UTF-16 as for the drivers.
Could you try to give utf-16 strings?
regards,
Hiroshi Inoue
> Josef Springer
>
> Hiroshi Inoue wrote:
>> (2011/04/03 20:50), Josef Springer wrote:
>>> Hello everybody,
>>>
>>> I have detected some strange behavior updating columns with Unicodes
>>> strings.
>>>
>>> Environment:
>>> PostgreSQL 8.2.5
>>> Database encoding: UTF8
>>> ODBC: PostgreSQL Unicode Version 08.02.04.00
>>>
>>> I am updating via ODBC a column (character varying nnn) of a record to
>>> an unicoded string.
>>>
>>> Updating by using the command as one parameterblock
>>> 'UPDATE adresse SET company = ''Seifert und Partner KG € 文件'' WHERE id
>>> = 1'
>>> works right. (the whole parameterblock is encoded to UTF8)
>>>
>>> Updating the record by using the command 'UPDATE adresse SET company=?
>>> WHERE record.id=?'
>>> and providing the arguments for ? UTF8-encoded in an extra buffer
>>> destroys the columns content.
>>>
>>> If i update the column with an UTF8 encoded character in the default
>>> range (the EURO Sign €), it works.
>>>
>>> Can anybody give me some hints ?
>>
>> How do you bind the parameters?
>>
>> regards,
>> Hiroshi Inoue
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: 08.02.04.00 Updating column with Unicode
@ 2011-04-05 08:27 Josef Springer <Josef.Springer@joops.com>
parent: Hiroshi Inoue <inoue@tpf.co.jp>
0 siblings, 1 reply; 7+ messages in thread
From: Josef Springer @ 2011-04-05 08:27 UTC (permalink / raw)
To: Hiroshi Inoue <inoue@tpf.co.jp>; +Cc: pgsql-odbc
Hello Hiroshi,
the encoding of the databsase is set to UTF-8. So i think, i must use
UTF-8. I have tried allready giving UTF-16 strings, but with the same
results.
Thanks for your help,
Josef
Hiroshi Inoue wrote:
> Hi Josef,
>
> (2011/04/04 22:47), Josef Springer wrote:
>> Hi Hiroshi,
>>
>> the parameters are bound as an UTF8-encoded bytearray. Because the
>> interface is controlled by a Smalltalk application, i think the codings
>> does not help you:
>> /bytes := v asByteArrayEncoding: #'utf-8'.
>> p copyAt: 0 from: bytes size: (size := bytes size) startingAt: 1.
>> p at: size put: 0
>> /
>
> Unfortunately I know nothing about Smalltalk.
> Anyway *Unicode* means UTF-16 as for the drivers.
> Could you try to give utf-16 strings?
>
> regards,
> Hiroshi Inoue
>
>> Josef Springer
>>
>> Hiroshi Inoue wrote:
>>> (2011/04/03 20:50), Josef Springer wrote:
>>>> Hello everybody,
>>>>
>>>> I have detected some strange behavior updating columns with Unicodes
>>>> strings.
>>>>
>>>> Environment:
>>>> PostgreSQL 8.2.5
>>>> Database encoding: UTF8
>>>> ODBC: PostgreSQL Unicode Version 08.02.04.00
>>>>
>>>> I am updating via ODBC a column (character varying nnn) of a record to
>>>> an unicoded string.
>>>>
>>>> Updating by using the command as one parameterblock
>>>> 'UPDATE adresse SET company = ''Seifert und Partner KG € 文件''
>>>> WHERE id
>>>> = 1'
>>>> works right. (the whole parameterblock is encoded to UTF8)
>>>>
>>>> Updating the record by using the command 'UPDATE adresse SET company=?
>>>> WHERE record.id=?'
>>>> and providing the arguments for ? UTF8-encoded in an extra buffer
>>>> destroys the columns content.
>>>>
>>>> If i update the column with an UTF8 encoded character in the default
>>>> range (the EURO Sign €), it works.
>>>>
>>>> Can anybody give me some hints ?
>>>
>>> How do you bind the parameters?
>>>
>>> regards,
>>> Hiroshi Inoue
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: 08.02.04.00 Updating column with Unicode
@ 2011-04-07 23:50 Hiroshi Inoue <inoue@tpf.co.jp>
parent: Josef Springer <Josef.Springer@joops.com>
0 siblings, 0 replies; 7+ messages in thread
From: Hiroshi Inoue @ 2011-04-07 23:50 UTC (permalink / raw)
To: Josef Springer <Josef.Springer@joops.com>; +Cc: pgsql-odbc
Hi Josef,
Could you send me directly the Mylog output?
regards,
Hiroshi Inoue
(2011/04/05 17:27), Josef Springer wrote:
> Hello Hiroshi,
>
> the encoding of the databsase is set to UTF-8. So i think, i must use
> UTF-8. I have tried allready giving UTF-16 strings, but with the same
> results.
>
> Thanks for your help,
> Josef
^ permalink raw reply [nested|flat] 7+ messages in thread
* 08.02.04.00 Updating column with Unicode does not work
@ 2011-04-14 08:36 Josef Springer <Josef.Springer@joops.com>
0 siblings, 0 replies; 7+ messages in thread
From: Josef Springer @ 2011-04-14 08:36 UTC (permalink / raw)
To: pgsql-odbc
Hello everybody,
I have detected some strange behavior updating columns with Unicodes
strings.
Environment:
PostgreSQL 8.2.5
Database encoding: UTF8
ODBC: PostgreSQL Unicode Version 08.02.04.00
I am updating via ODBC a column (character varying nnn) of a record to
an unicoded string.
Updating by using the command as one parameterblock
'UPDATE adresse SET company = ''Seifert und Partner KG EUR ??'' WHERE id
= 1'
works right. (the whole parameterblock is encoded to UTF8)
Updating the record by using the command 'UPDATE adresse SET company=?
WHERE record.id=?'
and providing the arguments for ? UTF8-encoded in an extra buffer
destroys the columns content.
If i update the column with an UTF8 encoded character in the default
range (the EURO Sign EUR), it works.
It seems that:
*SQLExecute handles UTF8 encoded character in the right way
SQLBindParameter handles UTF8 encoded character** in the wrong way (bad
encoding)
*
Can anybody give me some hints ?
mit freundlichen Grüßen / best regards,
Josef Springer
(Geschäftsleitung/Management)
Postal
Address
_Josef.Springer@joops.com_
Orlando-di-Lasso Str. 2
D-85640 Putzbrunn
Phone
Office
+49 (0)89 600 6920
Phone Fax
+49 (0)89 600 69220
Web
Web
http://www.joops.com
JOOPS
(HRB München 86239)
*-- the software company --*
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2011-04-14 08:36 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-04-03 11:50 08.02.04.00 Updating column with Unicode Josef Springer <Josef.Springer@joops.com>
2011-04-04 13:18 ` Hiroshi Inoue <inoue@tpf.co.jp>
2011-04-04 13:47 ` Josef Springer <Josef.Springer@joops.com>
2011-04-05 03:38 ` Hiroshi Inoue <inoue@tpf.co.jp>
2011-04-05 08:27 ` Josef Springer <Josef.Springer@joops.com>
2011-04-07 23:50 ` Hiroshi Inoue <inoue@tpf.co.jp>
2011-04-14 08:36 08.02.04.00 Updating column with Unicode does not work Josef Springer <Josef.Springer@joops.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox