From: Erik <eri...@bo...> - 2005-11-23 13:23:19
|
Hi I have played with pagekit for some time now. And now I would be able to have a site that use UTF8 internally. But how to I do that. The easy part is to have all files in UTF-8 and save to the DB in UTF-8 and so on. But pagekit are smart and sends the page in the encoding the browser prefers. That is not any problem. But who do I handle the input from a form? I mean how do I know what char encoding the web-browser are sending in? I can't trust the outgoing encoding because that is trivial to change in ant browser. Afaik there are no serten way to tell what encoding by just looking at the string. What are you doing to fix this? Om my previous site i "converted" all to Latin-1. But that was just a ugly hack. utf8:Is_utf8() and Encode::is_uft8() won't help they say false on every string passed by apache. :/ One way is to block pagekit and send everything in UTF-8 because most often the browser will send the return in UTF-8... but that solution aren't bullet prof. The user can still send in eg Latin-1 or the browser do not handle UTF-8 (rare). Any ideas? --=20 /erikg=20 =20 Erik G=FCnther eri...@bo... System Developer Bokus AB +46 (0)40 - 35 21 19 icq: 160744619 = =20 =20 Fortune: 'Course, I haven't weighed in yet. :-) -- Larry Wall in <199...@wa...> |