There are many messages on this forum, where people have different troubles with encodings. This is becouse in ZoneMinder's code is using php function htmlentities which converts it's param into latin1, if other not set manually.
I solved this problem by replacing all lines, which includes this function, from htmlentities($some_text) to htmlentities($some_text, ENT_COMPAT, "UTF-8").
Would be better to make some patch for this, but it must to include also support for other, non-utf charsets, so i don't know, how to do it quickly and correctly
About unicode ant other non-latin1 charsets
-
- Posts: 21
- Joined: Wed Oct 21, 2009 6:45 pm
Re: About unicode ant other non-latin1 charsets
The definitive solution is to port Zoneminder to UTF-8, as the most of sites and GNU/Linux distros already done.
Start using gettext is good too.
Start using gettext is good too.
Re: About unicode ant other non-latin1 charsets
For proper display of unicode characters on a server with utf-8 enabled in php, the php language files (in the lang folder) have to be encoded in utf-8.
I noticed it was not the case for my native language (french).
I fixed the issue by editing the file with vim and convert it to utf-8 with the following command in vim:
Not necessary, but I also forced utf-8 rendering in the web browser by decommenting the header line in the file and changing it to:
I hope this can help someone.
I noticed it was not the case for my native language (french).
I fixed the issue by editing the file with vim and convert it to utf-8 with the following command in vim:
Code: Select all
:set fileencoding=utf-8
Code: Select all
header( "Content-Type: text/html; charset=utf-8" );
Re: About unicode ant other non-latin1 charsets
Hi all,
Having accentuated french characters not well displayed, i've just tried this :
sudo cp -p fr_fr.php fr_fr.php_sav
sudo iconv -f ISO-8859-15 -t UTF-8 -o fr_fr.php_utf8 fr_fr.php
sudo cp -p fr_fr.php_utf8 fr_fr.php
In the lang directory : /usr/share/zoneminder/lang
Then it seems to work well
Have nice day all
Having accentuated french characters not well displayed, i've just tried this :
sudo cp -p fr_fr.php fr_fr.php_sav
sudo iconv -f ISO-8859-15 -t UTF-8 -o fr_fr.php_utf8 fr_fr.php
sudo cp -p fr_fr.php_utf8 fr_fr.php
In the lang directory : /usr/share/zoneminder/lang
Then it seems to work well
Have nice day all