Challenging exec question

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
wpsa
Forum Newbie
Posts: 1
Joined: Thu Apr 16, 2009 7:12 pm

Challenging exec question

Post 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?
charlestide
Forum Newbie
Posts: 3
Joined: Fri Apr 17, 2009 1:21 am

Re: Challenging exec question

Post 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") );
?>
 
Post Reply