Jump to content

Thai Script - Centos 6.3 X64


frankold

Recommended Posts

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.




×
×
  • Create New...