Skip to content
View in the app

A better way to browse. Learn more.

Thailand News and Discussion Forum | ASEANNOW

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Thai Script - Centos 6.3 X64

Featured Replies

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

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.

  • Author

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"

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.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.