
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Japanese encoding
- Date: Thu, 22 Aug 2002 13:07:51 +1000 (EST)
- From: Jim Breen <jwb@example.com>
- Subject: Re: [tlug] Japanese encoding
[Brett Robson ([tlug] Japanese encoding) writes:]
>> Is there any automatic translation between encoding in the standard web
>> browser/web server model?
>>
>> For instance, if you have a web form that accepts data, will the computer
>> that the user is using will send data in whatever encoding that computer
>> uses? Or the server? (I wouldn't think so) So is it true that my cgi script
>> running on Linux Apache could receive data any practically any format?
The client should/must submit the data from the form in the encoding of
the page. So if a page has been set to EUC-JP, via either the MIME
header right at the very front or via a <meta http-equiv charset="..">
the browser should submit it that way.
Note that this is coming from forms. There are other ways data can
arrive in a CGI program, e.g. from a Javascript toolbar button, a
hand-entered URL+parameters, etc. For example in the toolbar buttons
I generate for WWWJDIC, text can be cut from a WWW page and sent in from
Javascript. The coding works like this:
Netscape 4 under Linux/Unix -> EUC
Netscape 4 under Windows -> Shift_JIS
IE5/6 -> UTF8
Mozilla/Galeon/etc. -> Whatever code the
original page used.
These are but challenges we have to overcome. In both WWWJDIC and Google
there is a coding tag in the parameters so the CGI can react
appropriately. Goo autodetects in a very clever way.
In general though, if the page has the coding set to something, the data
should arrive in that coding.
HTH
Jim
--
Jim Breen (j.breen@example.com http://www.csse.monash.edu.au/~jwb/)
Computer Science & Software Engineering, Tel: +61 3 9905 3298
P.O Box 26, Monash University, Fax: +61 3 9905 5146
Clayton VIC 3800, Australia $B%8%`!&%V%j!<%s(B@$B%b%J%7%eBg3X(B
Home |
Main Index |
Thread Index