[postmodern-devel] encoding problem

Nicolas Martyanoff khaelin at gmail.com
Sun Feb 13 20:42:02 UTC 2011


Marijn Haverbeke <marijnh at gmail.com> writes:

> Hm. Then, this would suggest a bug somewhere. Do simpler non-ascii
> things work? (For example, walk through the quickstart.) Can you give
> me your Postgres version, and the exact query that goes wrong?

Yep, no problem with ascii.

I attached the test file I used:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20110213/ff3c30b5/attachment.html>
-------------- next part --------------

The query is:

    (postmodern:execute (:update 'posts :set
                                 'title title
                                 'content content
                                 'content-html content-html
                                 'creation-date (date-format-iso-8601 creation-date)
                                 'visible visible-p
                                 :where (:= 'id id)))

Where content-html contains the string read from the html file.

I then get the following error:


Database error 08P01: invalid message format
Query: UPDATE posts SET title = E'Test', content = E'- Some ascii.
- Some UTF-8 (exists in latin 1): ?
- Some UTF-8 (does not exist in latin 1): ?', content_html = E'<ul
><li
  >Some ascii.</li
  ><li
  >Some UTF?8 (exists in latin 1): ?</li
  ><li
  >Some UTF?8 (does not exist in latin 1): ?</li
  ></ul
>   ', creation_date = E'2011-02-03 08:13:43+01:00', visible = true WHERE (id = E'1')
   [Condition of type CL-POSTGRES:DATABASE-ERROR]


Regards,

-- 
Nicolas Martyanoff
   http://codemore.org
   khaelin at gmail.com


More information about the postmodern-devel mailing list