1

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,

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.