2

I've found a lot of strange characters on data rows like this

ÃÃÂÃ

The data inserted by perl script which converting to UTF8 encoding, here is the code parameter

$v = &Encode::encode('UTF-8', $v);

Here is the server information

\d ws_user_address
column          | type                        | Modifiers
address_id      | integer                     | not null
address_1       | text                        | not null

postgres=# show client_encoding; 
client_encoding
---------------
UTF8 
(1 row)
postgres=# show server_encoding; 
server_encoding
---------------
UTF8 
(1 row)

select version();
PostgreSQL 9.1.18 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11), 64-bit 

select address_id,address_1 from ws_user_address where address_id=1535278
1535278;Puri VADS, Jalan HR Rasuna Said Kav H No 1 ÃÃÃ...

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

What i can do to solve this issue on my system?

  • 3
    Where is the data displayed like that? In a terminal? It could be that the data has stored correctly in the database, but your terminal is not capable of displaying the UTF8 correctly. – Philᵀᴹ Dec 29 '15 at 11:06
  • Characters are not found "on data rows". Rows have columns. Columns have data types. And you need to execute a query in a client to get a text representation of your data. Most of the crucial links in this chain are missing from your question. – Erwin Brandstetter Dec 29 '15 at 19:31
  • @Phil i try access on terminal and postgresql client both of them shows those characters and i try to display it on browser but the process is terminated because the query is timeout since the rows is heavy to load. – Hendra Budiawan Dec 30 '15 at 3:54
  • @ErwinBrandstetter thank you for your response, i add the details on the question. – Hendra Budiawan Dec 30 '15 at 4:26
  • You show client_encoding twice. c/p error? – Erwin Brandstetter Dec 30 '15 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.