Forum Moderators: phranque
not a problem with plain PHP.
example: 3 Polish letters "ąśł" entered.
I used urlencode function and got that address (in fact it doesn't matter if I do use it... it works all right in either case):
target.php?one=%C4%85%C5%9B%C5%82
Displays all right.
Now the problem begins.
I want a short url, so I use this rule:
RewriteRule ^n-([^\.]*).htm$ target.php?one=$1 [L]
And I get messed up characters!
HTML source for correct characters: ąśł
HTML source for characters passed via htaccess: ä…ĺ›ĺ‚
Please tell me what do I do wrong and what should I do?
Edit: unfortunately webmasterworld messes up with characters too, so I can't show them correctly. Hopefully you get the idea...
About the only thing I can think of is that RewriteRule has a [NE] (noescape) flag that tells it not to escape the character "%" in rewritten URLs. You might want to check the documentation of that flag to see if it sounds like it might help. If you pass a double-esacaped encoded character to a browser, it might cause an error, but this is just a guess.
Jim