I've using two textareas and a button. The idea is when the button is pressed all the information on textarea1 will be send to the php function reverse them and then return the result on textarea2 (I am using ajax as well so I don't have to reload the website).
Now the issue is, although this works with properly there is an issue with special symbols since they show up as � when they come back in textarea2 (not all of them though) so I'm assuming there is an issue with the encoding somewhere.
This is the simple php code that returns the result to textarea2
<?php
$data = rawurldecode($_GET["data"]);
//mb_internal_encoding("UTF-8");
//mb_http_output( "UTF-8" );
// ob_start("mb_output_handler");
echo strrev($data);
?>
As you can see I tried already to set the internal encoding to UTF-8, also I've tried encoding the data before they get send to php and decode them in the php function but it had the same effect.