Bug #63426 [Opn]: Can't throw exceptions with accentued chars coded in latin1/ISO-8859-1

From: Date: Sat, 03 Nov 2012 13:23:07 +0000
Subject: Bug #63426 [Opn]: Can't throw exceptions with accentued chars coded in latin1/ISO-8859-1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-174503@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63426&edit=1

 ID:                 63426
 Updated by:         laruence@php.net
 Reported by:        rick dot hjpbarcelos at gmail dot com
 Summary:            Can't throw exceptions with accentued chars coded in
                     latin1/ISO-8859-1
 Status:             Open
 Type:               Bug
 Package:            *Unicode Issues
 Operating System:   Linux/Ubuntu 12.10
 PHP Version:        5.4Git-2012-11-03 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

I can not reproduce this, both uncaught exception here(browser/bash).

thanks


Previous Comments:
------------------------------------------------------------------------
[2012-11-03 12:08:33] rick dot hjpbarcelos at gmail dot com

function exceptionHandler($e) {
	echo $e;
}
set_exception_handler('exceptionHandler');
throw new Exception('é');

This way, it works, the message is shown.

------------------------------------------------------------------------
[2012-11-03 11:48:20] rick dot hjpbarcelos at gmail dot com

Description:
------------
Package 5.4.6-1ubuntu1

I don't really know why it's happening, started after I upgraded from version 5.3.4.

I tried to set the coding on browser (tested with Firefox and Chrome) and the problem didn't go
away.

Test script:
---------------
Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);
header('Content-Type: text/html;charset=iso-8859-1');
throw new Exception("é");


Expected result:
----------------
Fatal error: Uncaught exception 'Exception' with message 'é' in
/home/henrique/public/teste.php:4 Stack trace: #0 {main} thrown in /home/henrique/public/teste.php
on line 4

Actual result:
--------------
On browser:

With xdegub:

( ! ) Fatal error: in /home/henrique/public/teste.php on line 4
( ! ) Exception: in /home/henrique/public/teste.php on line 4
Call Stack
#	Time	Memory	Function	Location
1	0.0002	124436	{main}( )	../teste.php:0

Withou it:
Fatal error: in /home/henrique/public/teste.php on line 4
__________

On bash:

Stack trace:
#0 {main}
  thrown in /home/henrique/public/teste.php on line 4

Fatal error: Uncaught exception 'Exception' with message '�' in
/home/henrique/public/teste.php on line 4

Exception: � in /home/henrique/public/teste.php on line 4

Call Stack:
    0.0002     121256   1. {main}() /home/henrique/public/teste.php:0



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63426&edit=1


Thread (16 messages)

« previous php.bugs (#174503) next »