Re: PHP trigger_error() and utf8 characters?
| From: | Aziz Saleh | Date: | Fri, 28 Nov 2014 01:10:51 +0000 |
| Subject: | Re: PHP trigger_error() and utf8 characters? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324067@lists.php.net to get a copy of this message | ||
On Thu, Nov 27, 2014 at 7:02 PM, Jakov Sosic <jsosic@gmail.com> wrote:
> Hi guys,
>
> I'm using Apache + mod_php, and I've noticed that when I use trigger_error
> in PHP, and put some non us-western chacarter in string of the message, it
> gets written to apache error_log incorrectly.
>
> For example, this line:
>
> <?php trigger_error("Greška", E_USER_WARNING); ?>
>
> dumps following line in error_log:
>
> PHP Warning: Gre\xc5\xa1ka in /var/www/jsosic.php on line 1
>
> Is this something that can be rectified or should I simply stop using non
> us-western characters in trigger_error calls?
>
> (For anyone interested, "Greska" stands for error in my native language -
> Croatian).
>
>
> I have observed this behaviour on php 5.4 and 5.6 (IUS built RPMs) on
> CentOS 6.x x86_64.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
How are you dumping or viewing the error log? Are you sure it supports utf8
encoding?