Menu

#29 A tweak to solve the problem with non ISO-8859-1 charsets

open
nobody
None
5
2004-01-28
2004-01-28
Anonymous
No

Hello,

Installed and started using phpFriendlyAdmin. Great
stuff. There is, however, a small problem experienced by
users needing to work with tables containing text
encoded with charsets different than ISO-8859-1.

First of all, a charset=ISO-8859-1 directive is hardcoded
in a number of script files within phpFriendlyAdmin. This
can be hacked by doing a simple string replacement,
changing into a desired charset - but it would be even
better if charset would be a configurable option and one
would not need to mess with the scripts code.

Then, liberal use of htmlentities() function in Field.php
format() function results in non ISO-8859-1 charsets
being displayed incorrectly. (I've been working with
Windows-1257 (Baltic) charset myself).

The problems disappeared after replacing htmlentities()
with htmlspecialchars() which translates the necessary
stuff but leaves most of the other "weird" characters
alone.

I wonder whether this change won't result in other
problems in some special cases. I would appreciate a
comment from the author on that.

Thanks,

Aldas Kirvaitis
kirvaitis@yahoo.com

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.