VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Quality & Testing VirtueMart 1.1.x => Virtuemart 1.1 Development (Archiv) => Q&T Resolved => Topic started by: jkl-web on October 07, 2007, 00:27:36 AM

Title: [FIXED] High Prio - Latest SVN with J!1.5RC3 HBCS Handling Error!
Post by: jkl-web on October 07, 2007, 00:27:36 AM
Joomla 1.5 RC3 and Latest VirtuMart SVN build gave me this error:

Warning: cannot yet handle MBCS in html_entity_decode()! in /home/jklweb/public_html/administrator/components/com_virtuemart/classes/ps_main.php on line 660

Warning: cannot yet handle MBCS in html_entity_decode()! in /home/jklweb/public_html/administrator/components/com_virtuemart/classes/ps_main.php on line 660
Title: Re: High Prio - Latest SVN with J!1.5RC3 HBCS Handling Error!
Post by: Tordne on October 10, 2007, 09:11:52 AM
Looks like it is fixed in your link.  Can you advise how you resolved the error?

Thanks.
Title: Re: [RESPOND REQUESTED] High Prio - Latest SVN with J!1.5RC3 HBCS Handling Error
Post by: jkl-web on October 13, 2007, 07:07:46 AM
Yeah, I decided to look at the code and fix it my self since i got no answers on any of my posts. Basically it is a rather easy fix:

In ps_main.php where it says:
function vmHtmlEntityDecode($string, $quote_style = ENT_COMPAT, $charset = null) {

   if( function_exists('html_entity_decode')) {

      return html_entity_decode( $string, $quote_style, $charset );

replace that with:

function vmHtmlEntityDecode($string, $quote_style = ENT_COMPAT, $charset = null) {

   if( function_exists('html_entity_decode')) {

      return html_entity_decode( $string, $quote_style, $charset = 'ISO-8859-15' );
Title: Re: [RESPOND REQUESTED] High Prio - Latest SVN with J!1.5RC3 HBCS Handling Error
Post by: aravot on October 13, 2007, 18:10:26 PM
Without making any changes it works for me in Joomla 1.5 r9217 and VirtueMart 1.1 r998.

When do you get this error? Are you using a different language?
Title: Re: [RESPOND REQUESTED] High Prio - Latest SVN with J!1.5RC3 HBCS Handling Error!
Post by: mauri on January 10, 2008, 15:28:35 PM
Joomla! 1.0.13 and VM SVN 1.1.0 'beta2' revision 1144
I get Warning: cannot yet handle MBCS in html_entity_decode()! in /xxx/administrator/components/com_virtuemart/classes/phpInputFilter/class.inputfilter.php on line 565

And I change that line
$source = html_entity_decode($source, ENT_QUOTES, 'UTF-8');
to:
$source = html_entity_decode($source, ENT_QUOTES, 'ISO-8859-15');

Edit:
And I can use ISO-8859-1 too.

Edit2:
It´s  PHP 4.x.x  error.

Title: Re: [RESPOND REQUESTED] High Prio - Latest SVN with J!1.5RC3 HBCS Handling Error
Post by: aravot on January 10, 2008, 19:20:04 PM
PHP 4 error -> http://bugs.php.net/bug.php?id=27626
Title: Re: [UNDER REVIEW PHP4] High Prio - Latest SVN with J!1.5RC3 HBCS Handling Error!
Post by: mauri on January 10, 2008, 22:27:53 PM
Thanks aravot
That clears all what I inspect.
Sadly, that kind error comes from PHP.
Happy that I use Joomla! 1.0.13 and my site uses iso-xxx, and not utf-8.
Sendin mail to my host, to update PHP to 5 :-).-)
Title: Re: [UNDER REVIEW PHP4] High Prio - Latest SVN with J!1.5RC3 HBCS Handling Error
Post by: aravot on January 11, 2008, 18:59:21 PM
This error should be fixed in rev 1155, could someone with PHP4 test and report back.