visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: special characters problem


By: whirsch U.S.A.  Date: 26/05/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
I tried to submit a form with the post method.

<?php
if($_POST)
echo $_POST["input"];
?>
<form name="inputform" method="post">
<input name="input" type="Text">
<input type="Submit" value="auswerten">
</form>


When I use this script with Opera 7, NS 6.02 or Konqueror the some special characters (f.e the euro symbol) are converted into question marks.
With IE6, NS7, Mozilla 1.2.1 it worked fine. Is there a solution for this or is it a browser depending problem?
cu smart007
By: VGR Date: 26/05/2003 06:40:00 English  Type : Comment
I really don't know.

But perhaps you could urldecode()

for me, your script works fine with my Phoenix 0.5 when I passed this string to it : "totoێra"
By: whirsch Date: 26/05/2003 06:50:00 English  Type : Comment
mhm.
The problem is that the input is converted before I can call any function. This is the main problem.
cu Werner
By: schmad Date: 26/05/2003 07:36:00 English  Type : Comment
The best way to solve this problem would be to convert the euro symbol to its character entity.

The entity for the euro symbol is &#8364;

I would suggest a simple str_replace to accomplish this conversion.

$_POST[input] = str_replace("?","&#8364;",$_POST[input]);
By: VGR Date: 26/05/2003 08:01:00 English  Type : Answer
I think this is clearly an encoding-problem, browser-specific
By: whirsch Date: 27/05/2003 05:32:00 English  Type : Comment
Thanks for your fast help.
cu Werner

Do register to be able to answer

EContact
browser fav
page generated in 339.163780 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page