frankold Posted November 11, 2012 Share Posted November 11, 2012 Hi, I've just setup a LAMP server on a Centos 6.3 x64 VPS. php files on the VPS when viewed with winscp etc display the Thai Language as either ¸ªà¸¹à¸•à¸£à¸ª or ??????? though. On the old host It displays the Thai script fine through winscp. When the php webpage renders through apache on the VPS the Thai script displays fine with no config changes so I guess the httpd knows how to handle it. I changed the php.ini to a UTF8 charset but that doesn't seem to have fixed it. I thought this would be a good place to ask. Any ideas? thanks Link to comment Share on other sites More sharing options...
afp76 Posted November 14, 2012 Share Posted November 14, 2012 That is because your new host is not set to UTF-8. Changing "php.ini" is irrelevant as it only effects PHP, not your login environment. Login to your old host and check out what the locale is set to, and add that to the new host. Link to comment Share on other sites More sharing options...
frankold Posted November 14, 2012 Author Share Posted November 14, 2012 The host is already set to UTF-8 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" Link to comment Share on other sites More sharing options...
keasley Posted November 15, 2012 Share Posted November 15, 2012 Maybe this will help. http://winscp.net/eng/docs/faq_utf8 Link to comment Share on other sites More sharing options...
ITGabs Posted November 20, 2012 Share Posted November 20, 2012 I never use winscp but im my experience one possible cause could be the two bytes at the start of the php file. UTF-8 use a header  check this http://en.wikipedia.org/wiki/UTF-8#Byte_order_mark the problem is about many editors of php or plain text don't support utf8 and delete or change that byte, another thing to think it is about the ftp can convert the utf-8 file to ascii because the end of line win \n\r mac \r unix \n for the text files, so better to use binary for php files. do small tests, there are a few combinations to check where it's the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now