[postmodern-devel] character encoding

Roman Budzianowski superdog at budzianowski.net
Wed Sep 10 15:46:38 UTC 2008


Marijn,

I vaguely remember that I ran into it before, but since I was creating  
a new db
I just switched to Unicode on the postgres side.

I tried the same query in psql after setting the encoding to Unicode:
NCS=# \encoding
SQL_ASCII
NCS=# \encoding UNICODE
NCS=# \encoding
UTF8

The query worked. Not sure how much of a proof it is, but
it seems to imply that the problem might be on the lisp side.
E.g. a byte might be skipped or misinterpreted.

Roman

On Sep 10, 2008, at 12:40 AM, Marijn Haverbeke wrote:

> Hello Roman,
>
>> Invalid byte at start of character: 0x99
>> [Condition of type TRIVIAL-UTF-8:UTF-8-DECODING-ERROR]
>
> This seems to suggest that the text in the record is not actually
> ASCII, but some other 8-bit encoding. 0x7f is the highest character
> code ASCII text can contain. What does 'psql -l' show? Actually, the
> way I understood it is that if you set a UNICODE/UTF-8 encoding for
> the connection, which Postmodern does, it should translate any text
> into that encoding before sending it... but that would mean the error
> you're seeing could never occur. I've never seen it happen before...
> switching your database to UNICODE encoding is bound to fix it, or you
> can try setting Postmodern to use 8-bit encoding (with the 0x7f-0xff
> characters being interpreted in whichever way your Lisp implementation
> feels like, most likely latin-1) by changing the *unicode* parameter
> in the cl-postgres.asd file, and re-compiling the library.
>
> Best,
> Marijn
> _______________________________________________
> postmodern-devel mailing list
> postmodern-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel




More information about the postmodern-devel mailing list