CodeIgniter - PostgreSql encoding Error
I'm using PostgreSQL with CodeIgniter and I'm with some problems getting this query to work. The error is the following:
A Database Error Occurred
Error Number:
ERROR:开发者_运维知识库 invalid byte sequence for encoding "UTF8": 0x8a 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".
select * from table
where
lower(translate(country_ad, '()!$?: ,&+-/.ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ' , '-------------SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy')) = lower('Portugal')
and
lower(translate(zone_ad, '()!$?: ,&+-/.ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ' , '-------------SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy')) = lower('Lisboa')
Filename: C:\xampp\htdocs\pesquisa\system\database\DB_driver.php
Line Number: 330
Some clues on what I can do? I have tried to change the encoding of the PHP files but have not corrected the problem.
Some clues?
Best Regards,
Try to change the encoding of your PHP editor, from actual ( in most cases ANSI ) to UTF-8, then save again the PHP files.
精彩评论