Page 1 of 1

Challenging exec question

Posted: Thu Apr 16, 2009 7:27 pm
by wpsa
I have the following code in PHP:

Code: Select all

<?php
exec('java Translator "Questo èa"');
?>
The problem is when this is called all accents are stripped, how can this be fixed? Anybody have any idea?

Re: Challenging exec question

Posted: Fri Apr 17, 2009 1:29 am
by charlestide
you could use the function called "iconv" to covent the charset, if "iconv" is supported on your server.

Code: Select all

 
<?php 
exec('java Translator' . iconv(the charset of the word, the charset you want to output,"Questo èa") );
?>