Jump to content

Gracefully handle UTF-8?


random1

Recommended Posts

Hey All,

 

I currently have my site fully supporting UTF-8 (mulitple languages), support german, french, korean, japanese etc.

 

Is there a way in PHP to detect if a user support utf-8? So far in my testing if you own windows with Eastern language pack not installed it just comes back garbled:

 

이것은 테스트입니다

 

Help would be much appreciated :D :D

Link to comment
Share on other sites

Browsers typically send an accept-language and accept-charset header.  I don't know how much you can trust those for availability of certain utf-8 characters though, as a browser can easily "support" utf-8 without being able to display every code point.  You can probably rely on accept-language more for that, as someone who accepts zh-cn ought to be able to display chinese, for example.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.