Thread 'Bug in concept of page_head()'

Message boards : Web interfaces : Bug in concept of page_head()
Message board moderation

To post messages, you must log in.

AuthorMessage
ProfileAnanas

Send message
Joined: 27 Jun 06
Posts: 305
Germany
Message 4876 - Posted: 30 Jun 2006, 20:29:21 UTC
Last modified: 30 Jun 2006, 20:33:12 UTC

In no case, page_head() should modify the HTTP header "Content-type charset" property!

That's the reason why all projects have trouble with their character sets - title pages, forum entries and all that stuff looks OK only in this or in that charset.

Switching it for each user / country causes the pages to look right for a few people and wrong for most others.

There needs to be a project charset and all translations for that project have to respect this charset.

There should be one set of .po files for each common charset and the project should be able to choose between those sets.

I know that this is a bit more work - but I think it could be done with a converter, that generates the language sets from the current messy .po files.

PHP ConvertCharset.class v.1.0
��u�
ID: 4876 · Report as offensive
ProfileAnanas

Send message
Joined: 27 Jun 06
Posts: 305
Germany
Message 5179 - Posted: 1 Aug 2006, 7:52:11 UTC
Last modified: 1 Aug 2006, 7:58:17 UTC

First step for a better language / character set handling would be a really small modification of language.inc :

http://oct31.de/tmp/languages/translation.snippet

This change makes the compiled .po.inc files independant from the character set used for the web pages.

Do not use it like this yet as it supports only the subset of character sets which are supported by htmlentities(), some will have to use the old mechanism still.
��u�
ID: 5179 · Report as offensive

Message boards : Web interfaces : Bug in concept of page_head()

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.