Mailing List Archive


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

Re: [tlug] font encoding question



Brian Chandler writes:

 > But how will you know what the encoding is?

If jcode.pm is a reimplementation in Perl of Ken Lunde's jcode.c
suite, it contains utilities for detecting the encoding.  This is easy
and quite accurate if you know that the language is Japanese.

 > 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.

*In general*, you cannot.  This is recommended behavior per

http://www.w3.org/TR/html401/interact/forms.html#adef-accept-charset

but the recommendation is *very* weak, the spec doesn't even say
*should*.  It's actually quite likely that browsers become confused
about "current encoding", what with multiple windows and tabs,
autodetection and user overrides, and user preferences for language as
well as encoding.

In practice, it probably works pretty well, though, and Steve's
application is such that the same person is highly likely to be
running both the browser and the server.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links