#44096 [Fbk->Opn]: iconv: wrong charset

From: Date: Wed, 13 Feb 2008 19:01:42 +0000
Subject: #44096 [Fbk->Opn]: iconv: wrong charset
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122245@lists.php.net to get a copy of this message
 ID:               44096
 User updated by:  cpuidle at gmx dot de
 Reported By:      cpuidle at gmx dot de
-Status:           Feedback
+Status:           Open
 Bug Type:         ICONV related
 Operating System: WinXP
 PHP Version:      5.2.5
 New Comment:

See test case- file is ansi, not even any complex characters?


Previous Comments:
------------------------------------------------------------------------

[2008-02-13 17:52:17] jani@php.net

In what charset is the input here..?

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

[2008-02-11 08:40:15] cpuidle at gmx dot de

Description:
------------
Trying simple charset conversion with iconv:

iconv('iso-8859-1', 'utf-8', 'test');

receive this error:

Notice: iconv() [function.iconv]: Wrong charset, conversion from
ISO8859-1' to UTF-8' is not allowed in /var/htdocs/test.php on line 5

Problem: no troubleshooting information available, e.g. list or
supported charsets or similiar. 

How can this be diagnosed?

Reproduce code:
---------------
error_reporting(E_ALL);
$res = iconv('iso-8859-1', 'utf-8', 'test');

Expected result:
----------------
No error and/or supporting functions to aid diagnostics.

Actual result:
--------------
Error message:

Notice: iconv() [function.iconv]: Wrong charset, conversion from
ISO8859-1' to UTF-8' is not allowed in /var/htdocs/test.php on line 5



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


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


Thread (16 messages)

« previous php.bugs (#122245) next »