Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010

    Unanswered: Unable to insert accent letters by php

    My DB is UTF8 and I cannot change it.
    When I try to insert accent letters like ... I get
    Warning: pg_exec() []: Query failed: ERROR: invalid byte sequence for encoding "UTF8": 0xe82729 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding"

    How Can I insert into fields of tables words with accents?

  2. #2
    Join Date
    May 2008
    The data you're inserting is not UTF-8. You'll need to manually convert the encoding in order to insert it. Your platform may provide some tools to do this (Linux has iconv), or you may be able to use one of PostgreSQL's built-in string functions.

  3. #3
    Join Date
    Jul 2010
    Winnipeg, Canada
    As per above, since it looks like you're using PHP, you can encode/decode the strings with utf8_encode() and utf8_decode() respectively in PHP.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts