Form submission of Russian characters
From: Gunnar Hjalmarsson (noreply_at_gunnar.cc)
Date: 12/15/03
- Next message: Sam Holden: "Re: Starting Perl Script at Bootup"
- Previous message: Andy Lester: "Re: Starting Perl Script at Bootup"
- In reply to: Alan J. Flavell: "Re: Russian to Windows-1252 (htmlencode)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 15 Dec 2003 22:24:27 +0100
[ Move of the thread
http://groups.google.com/groups?threadm=b5884818.0312150701.427b8073%40posting.google.com
at clpmisc ]
Alan J. Flavell wrote:
> On Mon, 15 Dec 2003, Gunnar Hjalmarsson wrote:
>> To continue this experiment, I suggest that you replace the
>> second line in the script with:
>>
>> print "Content-Type: text/html; charset=Windows-1251\n\n<html><body>";
>
> That should help, yes: my investigations showed that browsers
> typically performed their form submission using the same character
> coding as the HTML page which contained the form, _provided_ the
> submitted characters could be represented in that character coding.
>
> However (ObPerl-ish), I refer you to the comment at
> http://www.perldoc.com/perl5.8.0/lib/Encode/Supported.html -
>
> "it is beyond the power of words to describe the way HTML browsers
> encode non-ASCII form data. To get a general impression, visit
> http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html
I reviewed the latter document. Thanks, Alan! Before I had read it, I
thought I had found a working approach for dealing with i18n in CGI
scripts. Now I know that I didn't have a clue. ;-)
>> If the actual form is on a static HTML page, you rather need a
>> meta header at that page:
>>
>> <meta http-equiv="Content-Type" content="text/html;
>> charset=Windows-1251">
>
> Objection, your Honour! You preferably need web server
> configuration (e.g AddCharset) to cause the web server to send out
> a proper HTTP header.
>
> W3C Hints and Tips:
> http://www.w3.org/International/O-HTTP-charset.html
>
> meta http-equiv="Content-type" is a second-rate ersatz for HTML
> (and an incomplete and problematical ersatz for XHTML).
Well, your objection was not unexpected. But, to be honest, how 'bad'
is it to use meta tags? After all, unlike the methods described in
that W3C document, the meta tag method is 'portable'.
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- PLEASE NOTE: comp.infosystems.www.authoring.cgi is a SELF-MODERATED newsgroup. aa.net and boutell.com are NOT the originators of the articles and are NOT responsible for their content. HOW TO POST to comp.infosystems.www.authoring.cgi: http://www.thinkspot.net/ciwac/howtopost.html
- Next message: Sam Holden: "Re: Starting Perl Script at Bootup"
- Previous message: Andy Lester: "Re: Starting Perl Script at Bootup"
- In reply to: Alan J. Flavell: "Re: Russian to Windows-1252 (htmlencode)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|