Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] font encoding question



steven smith wrote:
Edward Wright wrote:
On Sat, Jun 16, 2007 at 08:30:58AM -0700, steven smith wrote:
What I'm leaning toward is just saying "input must be utf-8"
and praying that it is.  Doing a split on the input to pull
out the individual characters and throwing out white space.
I'd then look through the result and compare these against
the KANJD212 input (stored as a hash) and warn the user that
characters didn't convert if there are problems.

Does this sound like a good approach, and is it sufficient?

Check out Jcode.pm You can convert whatever encoding the browser sent you into whatever you want to use.

Ed

This looks like exactly what I was looking for.
Thanks!
Sreve S.


But how will you know what the encoding is?

Actually I believe it is simpler than this. If you have a webpage encoded in UTF-8, you can (*) assume that the browser will return form input values in the same encoding.

(*) Disclaimer in margin. Margin too narrow. Oh well.

Brian Chandler
http://imaginatorium.org



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links