linux - PHP interpreting string differently between Postgresql servers -


i have php code submitting string 2 postgresql databases on 2 different servers.

the string is:

'£pound €euro' 

php server version:

  • php 5.4.36-0+deb7u3
  • debian linux 3.2.0-4-amd64

server 1 version:

  • debian linux 2.6.32-5-amd64
  • postgresql: 9.1.11

server 2 version:

  • debian linux 2.6.32-5-amd64
  • postgresql: 9.1.7

the server encoding both utf8

the client_encoding utf8

the locale both servers same also.

the following code used execute query:

$oconn=@pg_connect('host=$myip dbname=$mydb user=$myuser password=$mypassword'); $sql = "select * _myfunction($mystring)";  $result=@pg_query($oconn, $sql); 

what i'm finding happening when query executed, following being received server 1:

select * _myfunction('£pound €euro') 

yet on server 2 following being received:

select * _myfunction('£pound �euro') 

does have clue on figure out causing difference query being received between 2 servers. seeing server 2's query turning funky, invalid byte sequence errors in other parts of database causing issue.

i'm stumped. difference can see minor versions of postgresql.

i guess postgree charset not same in both servers. see how can change database encoding postgresql database using sql or phppgadmin? , may you


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -