Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Administration problem- Input fields and Hebrew


Guest

Recommended Posts

Hi,

I've been running my bilingual store for quite a while, building my own Hebrew language pack, and have been quite pleased with it.

However, there's one thing that I can't seem to fix:

when in the Admin, editing existing logs (products, customers, etc.), the hebrew information displayed in textareas appears as it should, but text in Input fields turns to gybberish.

See attached image for exampleproblem.jpg

I've checked the database itself, and when viewing it with Hebrew (ISO-Logical) encoding, it looks fine. Therefore, I assume the problem is with the admin page. The charset on it is iso-8859-8-i.

 

I'd appreciate any help you guys can offer.

 

-Ethan[/img]

Link to comment
Share on other sites

Please guys? I'm sure one of you other Israeli guys encountered this...

maybe the same has occured to one of you guys with Arabic, greek, Japaneese...

 

:cry:

 

-Ethan

Link to comment
Share on other sites

  • 3 weeks later...

I figured it out:

in admin->functions->general, there's a function called 'tep_draw_input_field'

////

// Output a form input field

 function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {

   $field = '<input type="' . $type . '" name="' . $name . '"';

   if ( ($GLOBALS[$name]) && ($reinsert_value) ) {

     $field .= ' value="' . htmlentities(trim($GLOBALS[$name])) . '"';

   } elseif ($value != '') {

     $field .= ' value="' . htmlentities(trim($value)) . '"';

   }

   if ($parameters != '') {

     $field .= ' ' . $parameters;

   }

   $field .= '>';



   if ($required) $field .= TEXT_FIELD_REQUIRED;



   return $field;

 }

simply replace the htmlentities with htmlspecialchars, and it won't abuse your Hebrew. This isn't perfect, but since htmlentities doesn't support any Hebrew charset, it's the best you can do.

 

see http://www.php.net/htmlentities for more details.

 

-Ethan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...