Page 1 of 1

About unicode ant other non-latin1 charsets

Posted: Thu Nov 20, 2008 12:53 pm
by miwa
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 :(

Re: About unicode ant other non-latin1 charsets

Posted: Wed Feb 01, 2012 9:05 am
by marcodefreitas
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.

Re: About unicode ant other non-latin1 charsets

Posted: Wed Jun 05, 2013 8:48 am
by lokidor
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:

Code: Select all

:set fileencoding=utf-8
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:

Code: Select all

header( "Content-Type: text/html; charset=utf-8" );
I hope this can help someone.

Re: About unicode ant other non-latin1 charsets

Posted: Sun Oct 12, 2014 8:32 am
by linflaas
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