[unixODBC-support] [Spam 3.00] Re: [Spam 3.00] Re: [Spam 3.00] Re: unixODBC not working with psqlodbc 08.04.0200 onLinux x64

luke luke at cedarstump.com
Mon Feb 15 15:49:51 GMT 2010


-----Original message-----
From: Nick Gorham nick at lurcher.org
Date: Mon, 15 Feb 2010 01:16:09 -0800
To: Support for the unixODBC project unixodbc-support at mailman.unixodbc.org
Subject: [Spam 3.00] Re: [unixODBC-support] [Spam 3.00] Re: [Spam 3.00] Re: unixODBC not working with psqlodbc 08.04.0200 on	Linux x64

> Luke Coldiron wrote:
> > On Linux with unixODBC and the Postgres ANSI driver and the same C++ 
> > code I am not able to do this.
> > Example:
> > CREATE TABLE luke_test(a TEXT);
> > INSERT INTO luke_test (a) VALUES('ý');
> > Error executing "INSERT INTO luke_test (a) VALUES('ý');": ERROR: 
> > invalid byte sequence for encoding "UTF8": 0xfd;
> > Error while executing the query
> > INSERT INTO luke_test (a) VALUES('þ');
> > Error executing "INSERT INTO luke_test (a) VALUES('þ');": ERROR: 
> > invalid byte sequence for encoding "UTF8": 0xfe;
> > Error while executing the query
> > INSERT INTO luke_test (a) VALUES('ÿ');
> > Error executing "INSERT INTO luke_test (a) VALUES('ÿ');": ERROR: 
> > invalid byte sequence for encoding "UTF8": 0xff;
> > Error while executing the query
> > SELECT * FROM luke_test;
> > DROP TABLE luke_test;
> >
> > The only thing that I could think of is that unixODBC is treating the 
> > character encoding as UTF8 and I would like it to just look at each 
> > byte as unsigned chars.  Should this work in unixODBC or am I off base?
> Ok,
> 
> I don't think thats down to unixODBC in this case, it just passes the 
> character to the driver. I think this is a question better asked of the 
> postgres folk as any answer I gave would be a guess, and they will know 
> the real answer.
> 
> Just one thing to check (that is one of the guesses), see if you have 
> environment LANG that is UTF and if so change to use non UTF.
> 
> -- 
> Nick
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support

Thank you for your excellent support on this issue.  I will post this question on the psqlODBC message board.  I am being to suspect something is different in the default driver encodings between the windows psqlodbc driver and the linux one.
> 


More information about the unixODBC-support mailing list