Unix Technical Forum

conversion problem

This is a discussion on conversion problem within the pgsql Interfaces odbc forums, part of the PostgreSQL category; --> When trying to insert strings with German umlaute (e.g. "täglich") into a text or varchar column, the server throws ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces odbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 01:01 AM
Andreas Pflug
 
Posts: n/a
Default conversion problem

When trying to insert strings with German umlaute (e.g. "täglich") into
a text or varchar column, the server throws the message
invalid byte sequence for encoding "UNICODE": 0xe4656c


This results from ResolveOneParam not converting the string to UTF-8.
From debugging I found that ipdopts->parameters[param_number].SQLType
contains 0xffff, instead of something sensible for PGType=0x19 (text).

The attached patch works as hotfix for me, but is certainly only a
workaround for a problem buried deeper because SQLType seems bogus to me.

OTOH, I don't understand why the switch(param_pgtype) was invented at
all (the original patch I posted more than a year ago didn't have it),
because any string coming from the app will probably need conversion to
UTF-8 anyway.

Regards,
Andreas



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com