|
Posted by Taras_96 on 01/07/07 14:12
Hi everyone,
I'm trying to write a webpage in Chinese (with someone that knows
Chinese doing the appropriate translation). I'm using PHP and MySQL. As
such, I wish to use UTF-8 (since it is supported by PHP's multibyte
string functions). However, the official Chinese character encoding is
GB, and I'm pretty sure that Windows uses GB encoding as well (since it
is listed as a MAC in the Windows regional options, plus I tried to
type some character's into notepad2 with the character encoding set on
UTF-8 and all that came out was boxes).
Because I want everything internal to the website to be in UTF-8, I
intend on specifying the accept-charset property in my forms as UTF-8.
What happens when someone either a) types in Chinese (which I assume is
stored in memory/RAM as GB) or b) copies and pastes some Chinese
characters from a document that does not use UTF-8 encoding and posts
the form? Does the browser somehow convert from GB (or any other
encoding that was used) to UTF-8 before sending the data to the server?
If this is the behaviour, then do all (or the majority of) browsers do
this?
Thanks
Taras
[Back to original message]
|