CodeIgniter - PostgreSql 编码错误

发布于 2024-11-01 18:04:29 字数 974 浏览 0 评论 0原文

我正在将 PostgreSQL 与 CodeIgniter 一起使用,但在使此查询正常工作时遇到一些问题。错误如下:

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

关于我能做什么的一些线索?我尝试更改 PHP 文件的编码,但尚未解决问题。

一些线索?

此致,

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,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

灯下孤影 2024-11-08 18:04:29

尝试将 PHP 编辑器的编码从实际编码(大多数情况下为 ANSI)更改为 UTF-8,然后再次保存 PHP 文件。

Try to change the encoding of your PHP editor, from actual ( in most cases ANSI ) to UTF-8, then save again the PHP files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文