URL encoding

From: Date: Wed, 13 Feb 2002 14:35:46 +0000
Subject: URL encoding
Groups: php.general 
Request: Send a blank email to php-general+get-84574@lists.php.net to get a copy of this message
Ok the thing is I’m getting the information from a mysql db and it is being fetched by a Flash app and then it is used to print out the info in a fancy way. I am trying to url encode special Icelandic charaters such as (“þ” ASCII 0222 or the Latin Letter “Thorn”) if you are able to see it but it should be printed out as %80 or %81 dependes on upper or lowercase, but it is printed out as “%DE” but not as before sayd %80 or numerical value, somhow the mac skrews those letters up so I would really like to hear from some one who knows how to fix this problem. Here below is my code: <?php include("db_connect.php"); $query = "select * from dominews order by id desc LIMIT 0,5"; $result = mysql_query($query, $db); $i = 0; while($row = mysql_fetch_row($result)){ $i++; $title = rawurlencode($row[1]); $date = rawurlencode($row[2]); $headline = rawurlencode($row[3]); $full = rawurlencode($row[4]); printf("title$i=%s&date$i=%s&headline$i=%s&full$i=%s", $title, $date, $headline, $full); } ?> <http://www.atom.is/> ------------------------ Davíð Örn Jóhannssson Vefforritari ------------------------ Atómstöðin hf. Garðastræti 37 101 Reykjavík ------------------------ sími: 595-3643 fax: 595-3649 <mailto:david@atom.is> david@atom.is <http://www.atom.is/> http://www.atom.is ------------------------

« previous php.general (#84574) next »