Magento Forum

Page 1 of 2
Wrong charset, conversion from `ISO-8859-1’ to `UCS-4LE’
 
Aldo
Member
 
Total Posts:  47
Joined:  2008-02-18
 

Hi all,

After installation of Magento I get the following Error in the Frontend:

Noticeiconv_substr() [function.iconv-substr]Wrong charsetconversion from `ISO-8859-1' to `UCS-4LE' is not allowed in /web/shop/app/code/core/Mage/Log/Model/Mysql4/Visitor.php on line 54

Does anybody have a solution for this?

Thanks!
Aldo

 
Magento Community Magento Community
Magento Community
Magento Community
 
Aldo
Member
 
Total Posts:  47
Joined:  2008-02-18
 

We install PHP5 as a CGI binary, as the provider does not have installed the pdo_mysq extension.

So we get this error only in a PHP5 as a CGI binary installation.

Would appreciate any help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Aldo
Member
 
Total Posts:  47
Joined:  2008-02-18
 

Nobody an idea here?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brightside
Jr. Member
 
Total Posts:  3
Joined:  2008-05-08
 

Anything new on this one?

I did a fresh install with php5-cgi and ran into same problem.

Anything I might miss in my server?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Juxecl
Member
 
Total Posts:  37
Joined:  2007-12-08
 

You could try changing the AddDefaultCharset directive in .htaccess

# AddDefaultCharset Off
AddDefaultCharset UTF-8
 
Magento Community Magento Community
Magento Community
Magento Community
 
Brightside
Jr. Member
 
Total Posts:  3
Joined:  2008-05-08
 
Rowd - 09 May 2008 02:23 AM

You could try changing the AddDefaultCharset directive in .htaccess

# AddDefaultCharset Off
AddDefaultCharset UTF-8

Tested it already, no luck.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Juxecl
Member
 
Total Posts:  37
Joined:  2007-12-08
 

I guess that was a pretty optimistic suggestion smile

There’s no character set given in the iconv_substr() function so it should use iconv.internal_encoding for the conversion. You could try changing the value of iconv.internal_encoding to ‘UTF-8’.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brightside
Jr. Member
 
Total Posts:  3
Joined:  2008-05-08
 
Rowd - 09 May 2008 10:47 AM


There’s no character set given in the iconv_substr() function so it should use iconv.internal_encoding for the conversion. You could try changing the value of iconv.internal_encoding to ‘UTF-8’.

Can be done in php.ini? Not sure how to change php settings for cgi version.

 
Magento Community Magento Community
Magento Community
Magento Community
 
VimS
Jr. Member
 
Total Posts:  23
Joined:  2008-04-27
 

Hi!

I’ve got the same Problem.
Any solutions or suggestions?!

 
Magento Community Magento Community
Magento Community
Magento Community
 
sword
Jr. Member
 
Total Posts:  9
Joined:  2008-05-31
 

See
http://www.magentocommerce.com/boards/viewthread/1202/

 
Magento Community Magento Community
Magento Community
Magento Community
 
Core
Member
 
Total Posts:  68
Joined:  2008-03-09
 

Put these lines at the top of the main index.php file.

iconv_set_encoding("internal_encoding""UTF-8");
iconv_set_encoding("output_encoding""ISO-8859-1");
 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

This should work, but be careful not to use it in the wrong places. It will set the header from UTF-8 to ISO-8859-1.

Mage::app()->getResponse()->setHeader("Content-Type""text/html; charset=ISO-8859-1",true);

Hope it helps someone ^^

 
Magento Community Magento Community
Magento Community
Magento Community
 
AlexeyShtrakhov
Jr. Member
 
Total Posts:  16
Joined:  2008-07-11
Tampere, Finland
 

Thanks Bockbertil!!! You saved my life grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
Eric Cavalcanti
Guru
 
Avatar
Total Posts:  710
Joined:  2008-09-28
San Antonio
 

None of this help was useful to me when I had to run a Javascript.
:(

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sunny_S
Jr. Member
 
Total Posts:  30
Joined:  2009-05-08
India
 

Hi MageParts,
Your solution of adding:

Mage::app()->getResponse()->setHeader("Content-Type", “text/html; charset=ISO-8859-1”,true);

worked great smile. i was struggling from a long time and didnt want to change it for whole site, and found your post the right solution! hope this helps many more.

Thanks,
Sunny

 
Magento Community Magento Community
Magento Community
Magento Community
 
coochy
Member
 
Total Posts:  69
Joined:  2009-01-20
 

Hi Mageparts, can you tell me exactly where to put this code? Which file & which position please?

Thanks so much
Coochy

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2