php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61456 iconv set encoding bug
Submitted: 2012-03-20 17:02 UTC Modified: 2012-03-20 19:11 UTC
From: tamate at hotmail dot com Assigned:
Status: Not a bug Package: ICONV related
PHP Version: 5.3.10 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tamate at hotmail dot com
New email:
PHP Version: OS:

 

 [2012-03-20 17:02 UTC] tamate at hotmail dot com
Description:
------------
---
From manual page: http://php.net/manual/en/function.iconv-set-encoding.php
---


Test script:
---------------
<?php
if(function_exists('iconv'))
{
iconv_set_encoding('internal_encoding','UTF-8')
iconv_set_encoding('output_encoding','ISO-8859-1//TRANSLIT//IGNORE');
ob_start('ob_iconv_handler');
}
?>

Expected result:
----------------
Running successfully

Actual result:
--------------
If you try the above one, you will get this error - 

Parse error: syntax error, unexpected T_STRING in directory/blah/directory on line 3

Pointed at iconv_set_encoding('output_encoding','ISO-8859-1//TRANSLIT//IGNORE');

even if you try iconv_set_encoding('output_encoding','ISO-8859-1');

You will see that you will still get an error.
I am not sure why this is happening, I am running on linux php 5.3

Or is there something wrong with my coding?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-20 17:08 UTC] tamate at hotmail dot com
Line 5*

Live example - http://giantcrabby.com/test/test.php
 [2012-03-20 17:10 UTC] tamate at hotmail dot com
-Package: Testing related +Package: ICONV related
 [2012-03-20 17:10 UTC] tamate at hotmail dot com
ICONV related*
 [2012-03-20 19:11 UTC] philip@php.net
-Status: Open +Status: Not a bug
 [2012-03-20 19:11 UTC] philip@php.net
You're missing a ; on line #4.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 01:01:28 2025 UTC