开发者

CodeIgniter - PostgreSql encoding Error

开发者 https://www.devze.com 2023-02-25 06:32 出处:网络
I\'m using PostgreSQL with CodeIgniter and I\'m with some problems getting this query to work. The error is the following:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消