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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 - 7 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 18:03:14 2021 UTC