I need help in a strange problem involving WAMP, MAMP & UTF

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rbow
Forum Newbie
Posts: 1
Joined: Fri Feb 20, 2009 4:13 am

I need help in a strange problem involving WAMP, MAMP & UTF

Post by rbow »

Hi, I've working on a web application, that should be able to accept tags and search queries in multiple languages. That's not asking too much, is it?

Now, on my development MAMP server everything is great. I add multilingual tags, search in any language I want etc. On the other hand, on the production WAMP server, some multilingual characters give trouble.

For Example, the Hebrew letters ל,מ א do not get encoded properly (while ב & נ are fine).
e.g., if someone enters the search string ליבני the results are such:
* In the address bar the search phrase is correct, properly url-encoded.
* In the HTML itself I see the string "�_יבני" which is "%D7_%D7%99%D7%91%D7%A0%D7%99", meaning the ל has been encoded to "%D7_" instead of "%D7%9C" as it should have.

Also, the tag משחקים has been entered into the system. I can see it is properly saved in the database, but when I try to url_encode it, I get %D7_%D7%A9%D7%97%D7%A7%D7%99%D7_ (noticed the damn "%D7_" again).

-Both Environments use PHP 5, mysql and Apache.
-MAMP uses PHP 5.2.5 while the WAMP server uses PHP 5.2.8
-Mysql table are all UTF-8
- Encoding and Meta tags both are UTF-8
- I've tried AddDefaultCharset utf-8
- I've tried adding the following to the php.ini:
mbstring.language = Neutral ; Set default language to Neutral(UTF-8) (default)
mbstring.internal_encoding = UTF-8 ; Set default internal encoding to UTF-8
mbstring.encoding_translation = On ; HTTP input encoding translation is enabled
mbstring.http_input = auto ; Set HTTP input character set dectection to auto
mbstring.http_output = UTF-8 ; Set HTTP output encoding to UTF-8
mbstring.detect_order = auto ; Set default character encoding detection order to auto
mbstring.substitute_character = none ; Do not print invalid characters
default_charset = UTF-8 ; Default character set for auto content type header

so far nothing works, and I'm fresh out of ideas.
:banghead:
Anyone?
Post Reply