Firefox PHP

Module Spam Hurdles v2.02 and encoding

Posted by mumblee 
Module Spam Hurdles v2.02 and encoding
November 23, 2010 01:00PM
Hi,

I've enabled the Spam Hurdles module, added the needed hook in the aerial pm_post.tpl file (tip I found in a previous topic in this forum), and so far it works well.

Except for an encoding problem -weird that noone has posted about this before- : my forum is set to use utf-8 but this module's french.php file is encoded in iso-8859-15. So I have some odd characters on the screen (question mark in a black losange).

I just had to open this file in a convenient text editor and save it using an utf8 encoding. I used gedit, but one can use emacs or whatever.

As I am a bit curious, I checked the other language files and found that the following files are also iso-8859-15 encoded. May be a utf-8 version should replace the actual one ? I don't know Phorum well enough to be able to answer this question, but I just thought that this information might be of interest.

Files in PHORUM_ROOT/mods/spamhurdles/lang which are not utf8 encoded :
  • german.php
  • german_sie.php
  • spanish_latin_american.php
  • turkish.php

amitiés :-)
Re: Module Spam Hurdles v2.02 and encoding
November 23, 2010 04:22PM
Please, follow the posting rules of the modules forum. This forum is only for posting completed modules, not for posting questions about modules. Best is to find the thread about the module that you have a problem with and report the problem in there. This keeps the modules forum from cluttering with support threads. I moved your question to the development forum instead.

The encoding is mainly a (bad) mixture because of historic reasons. There is no real good format for language files, resulting in for example two french.php base language files in different encodings (on UTF-8 and one ISO-8859-15/1). In Phorum 5.3, the plan is to have a better structure in language file naming, by including the character set name in the language file name.

If we would change the language files to UTF-8, it is very likely that people who have been running their Phorums for a while end up with problems, so it's not something that we can easily and mindlessly change.

Best for you would be to name your main language file in such way that it won't collide with the file that is now in the module dir (e.g. fr_FR.UTF-8.php, which is the format that we'll likely use in 5.3) and create a UTF-8 version of the language file in the mod directory using this same name.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module Spam Hurdles v2.02 and encoding
November 24, 2010 03:57AM
Quote
Maurice Makaay
Please, follow the posting rules of the modules forum. This forum is only for posting completed modules, not for posting questions about modules.
Sorry about this. I'll be more careful next time.

Quote

If we would change the language files to UTF-8, it is very likely that people who have been running their Phorums for a while end up with problems, so it's not something that we can easily and mindlessly change.
Ok.

Quote

Best for you would be to name your main language file in such way that it won't collide with the file that is now in the module dir (e.g. fr_FR.UTF-8.php, which is the format that we'll likely use in 5.3) and create a UTF-8 version of the language file in the mod directory using this same name.
I've done that. Works like a charm. Thank you very much !
Re: Module Spam Hurdles v2.02 and encoding
November 24, 2010 04:01AM
By the way, I had chosen "Follow topic" + "Email me about replies to this topic" for the first post of this topic. But I didn't receive any notification, whereas I had receive some for another post about the aerial boundaries template.

I suspect this could has something to do with the fact that my post was moved from a forum to another before you answered. Is this considered as normal or should the "follow topic" user choice be kept when the post is moved ? Just wondering...

Thanks again.
Re: Module Spam Hurdles v2.02 and encoding
June 16, 2011 05:07AM
Hi,
I have read Maurice answer above,
so I understand everything (about language) will be ok in Phorum 5.3 ;)

Just now, in phorum5-stable-svn-2011061523 we still have a bad mix of Charset/Encoding in these files :(
mods/spamhurdles/lang/german.php is ISO
but  mods/bbcode/lang/german.php is UTF
and  mods/bbcode/lang/french.php is ISO

mods/editor_tools/lang/spanish.php is ISO
but   mods/bbcode/lang/spanish.php is UTF
...

That means that the default installation of Phorum does not display correctly all labels
at least for German, French and Spanish. (did not test others)

Could be nice to have a coherent Encoding in the base install, at least for each lang file of a given language.
Thank's to think about that next time you update one of these files... ;)
Re: Module Spam Hurdles v2.02 and encoding
June 16, 2011 08:21AM
We have thought about that already, but beware that changing the files to a different charset will help you, but at the same time wreck the Phorum of somebody who was using the other charset already. We cannot do a large scale update for charsets within a stable Phorum tree, in order to keep the route open for admins to upgrade their Phorum and modules.

We wholeheartedly agree with you, but have an existing user base to please as well. If it were for us, the world would have been forced into full UTF-8 support ages ago ;-)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module Spam Hurdles v2.02 and encoding
June 13, 2013 08:50AM
Hi Zébulon,

Quote
Zébulon
That means that the default installation of Phorum does not display correctly all labels
at least for German, French and Spanish. (did not test others)

At least for German I offer a sophisticated language package which offers both ISO and UTF8 files for the Phorum core, core modules and frequently used modules.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Sorry, only registered users may post in this forum.

Click here to login