•  

Forum

Moderated by:
Forum Index
OpenPhpNuke
     Improve OPN
     charset for htmlentities() calls

Author Printer friendly pagecharset for htmlentities() calls
tgr4ripe

Joined: October 30, 2004
Posts: 3
Send private message to tgr4ripe
charset for htmlentities() calls

Posted: 2004-11-17 05:23

Is it possible to add a config variable that would specify output html charset ? I installed OPN for site where main language is russian (use CP1251 charset) and it would be usefull if htmlentities calls used non-default charset. For example I had to change every call htmlentities($some_variable) to htmlentities($some_variable, ENT_COMPAT, 'cp1251').

Now if someone wants to use OPN with default html charset it should be easy enough. Would be nice if $opnConfig['HtmlCharset'] existed somewhere and was configurable and subsequenly used as an argument in appropriate function calls.


Quote Printer friendly page upwards
xweber
Joined: April 14, 2003
Posts: 135


Send private message to xweber Visit website from xweber
Posted: 2004-11-17 10:59

I will have a look at that...

Alex


Quote Printer friendly page upwards
tgr4ripe

Joined: October 30, 2004
Posts: 3
Send private message to tgr4ripe
charset for htmlentities() calls

Posted: 2004-11-21 06:03

Ok, I found that in Admin->Settings-Graphics there is a drop down selection list for html
charset that sets opnConfig['opn_charset_encoding']. I added couple lines there to include
cyrillic charset 'cp1251' and modified lines like
../opn2/html/class/class.opn_output.php:426: echo '<meta http-equiv="content-Type" content="text/html; charset=ISO-8859-1" />'._OPN_HTML_NL;
to use value of $opnConfig['opn_charset_encoding'] instead of hardcoded value of ISO-8859-1 as well as htmlentities calls to use it.

Do you guys think it would be worthwhile to incorporate this approach in further developments ? I think OPN is a great CMS (I liked the clean and non-kludgy style of coding not to metnion good security track) and it would be nice to see some internatinalization support.


Quote Printer friendly page upwards
xweber
Joined: April 14, 2003
Posts: 135


Send private message to xweber Visit website from xweber
Posted: 2004-11-21 11:46

of course do we want to have a good internationalisation.

If you have changed some code, you can send it to me and after a review i will incorparate it.

Alex


Quote Printer friendly page upwards

Unregistered User
charset for htmlentities() calls

Posted: 2012-03-21 04:32

Magnificent items from you, man. I have take into accout your stuff pveirous to and you're simply extremely magnificent. I actually like what you've bought right here, really like what you're saying and the way in which by which you say it. You make it enjoyable and you still care for to stay it smart. I can not wait to read far more from you. This is actually a great web site.


Quote Printer friendly page upwards
sort by

Previous thread:  How to contribute
Next Thread:  Nike FlyKnit Trainer Womens They know the pieces

Jump To:

Nickname:
 
Security Code
Security Code
reload

 
Page took 0.13489 seconds to load