[pg-devel] pg-bind error when working with multibyte charset strings; implementation-name-for-encoding improvement
Anton
ya007 at yandex.ru
Mon Sep 18 12:05:26 UTC 2006
Hi
There is an error in pg-bind. When calculation length of a :string parameter
(push `(:int32 ,(1+ (length value))) data)
should be changed to:
(push `(:int32 ,(1+ (length (convert-string-to-bytes value
(pg-client-encoding connection))))) data)
Also, in the implementation-name-for-encoding function it's necessary to use
string-equal instead of string=.
PostgreSQL version I use - 8.1.3 under Windows - after executing "set
client_encoding to UTF8" "show client_encoding" returns "utf8" (lowercase).
Regards,
-Anton
More information about the pg-devel
mailing list