View Full Version : string encoding problem
I have a form with is submitting a string to a php page. the string is "oh ýes"... as you can see the y has an accent on top of it... this is because the y is a diacritic. I want to change the ý back into a y but i can not seem to find a command to do it ...i tried this but it didnt work
$thestring= str_replace('ý', "y", $thestring);
but the result is still "oh ýes".
04-23-2009, 10:13 PM
It replaced it just fine for me. Are you maybe calling the same variable name twice somewhere?
$string = "oh ýes";
$thestring = str_replace('ý', 'y', $string);
echo $string . '</br>';
it also works fine when i do it that way ... but when i am submitting the string from a form on the previous page.. everything gets messed up.... on the previous the page has utf=á encoding.
04-23-2009, 11:16 PM
Can you post your form? Hard to help without seeing the code.
It is just a simple form
<form name="form1" action="aftertestersignup.php">
<input type="text" name="string" >
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.