Re[2]: [fpc-pascal] Web site now translatable
Пётр Косаревский
ppkk at mail.ru
Tue Nov 21 15:00:49 CET 2006
> > Op Tue, 21 Nov 2006, schreef ???? ???????????: <-- it's me
> >> > If you would like to make the FPC website available in your own
> >> language,
> >> What encoding does it need? UTF8, UTF16, language specific (for
> >> example, five are supported by Opera for cyrillic text, windows-1251 is
> >> the most common).
> > Whatever you prefer. The database uses UTF-8, but I can configure the
> > website generator to generate any encoding.
> Well, preferably the WWW server should accept the charset configured in
> the browser...
and
> Nooooo,
> the browser should detect the charset sent by the server, and display it correctly
> If the client can do it, let the client do it. Golden rule for writing
> robust servers.
I asked about encoding, because it is possible to enter text in incorrect encoding into "translator" (i.e.: "translator" supposes the text to be in windows-1251 and I enter text in ISO-8859-5 [for cyrillic text]).
It looks like this problem does not arise if I type text in browser (Opera 9).
WWW server may honour Accept-Charset HTTP request header, and it should be easy to translate text on server with known charset to another one, so any desire for accessibility (which is present, as I see, because otherwise the whole translation thing would not appear at all) leads to implementing this honour-thing.
And client may have some problems displaying characters correctly (I don't think that it's possible to write 100%-hit encoding recognition) if the charset is not specified in the <meta http-equiv="content-type" ... charset="" > (well, if I get it right, it may be one step, not two, in the FPC website case; and as the webpages are static, there have to be copies with all the desired encodings).
Anyway, it seems, that the website already deals with these things good enough. Most modern browsers do already support plenty of encodings.
I didn't write anything ingenious, but if I'm wrong somewhere, please point at it.
More information about the fpc-pascal
mailing list