Current location: Hot Scripts Forums » Programming Languages » PHP » charset problem in exec


charset problem in exec

Reply
  #1 (permalink)  
Old 08-19-08, 02:05 PM
zodehala zodehala is offline
Wannabe Coder
 
Join Date: Mar 2007
Posts: 191
Thanks: 0
Thanked 0 Times in 0 Posts
charset problem in exec

PHP Code:

header("Content-Type: text/html; charset=ISO-8859-9");  

exec('ping www.google.com' ,$output$return_var);
foreach (
$output as $value){
    echo 
$value."<br/>";

above otuput is following


Code:
32 bayt veri ile www.l.google.com [66.249.93.147] 'ping' ediliyor:

66.249.93.147 cevab�: bayt=32 s�re=141ms TTL=242
66.249.93.147 cevab�: bayt=32 s�re=137ms TTL=242
66.249.93.147 cevab�: bayt=32 s�re=139ms TTL=242
66.249.93.147 cevab�: bayt=32 s�re=147ms TTL=242

66.249.93.147 i�in Ping istatisti§i:
Paket: Giden = 4, Gelen = 4, Kaybolan = 0 (0% kay�p),
Mili saniye t�r�nden yakla��k tur s�releri:
En Az = 137ms, En �ok = 147ms, Ortalama = 141ms
why are there problem in turkish characters ?
Reply With Quote
  #2 (permalink)  
Old 08-21-08, 04:14 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
the response of the exec function is probably returned as a UTF-8 string, so you'll have to convert it to iso-8859-9 before outputting it. You cloud also try changing the charset of your page to utf-8
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
charset problem zodehala PHP 3 06-02-07 12:01 PM
charset and mysql nassau Database 4 11-18-06 10:01 AM
login, roles problem dbrook007 ASP.NET 10 11-10-06 03:42 PM
IIS6 CGI EXEC Problem Clint ASP 9 03-10-06 04:20 PM
Asp and Microsoft Access 2002 problem gop373 ASP 2 10-06-04 09:13 AM


All times are GMT -5. The time now is 07:53 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.