Forum Moderators: coopster

Message Too Old, No Replies

PHP is swaping numbers for euro character

\200 becomes € in php

         

Cher

5:17 pm on Oct 26, 2007 (gmt 0)

10+ Year Member



I'm running php5 and coming across a strange issue. If I use the characters "\200" in Php they get swapped to being the Euro (€) symbol. If I just use normal html to print out "\200" there isn't any problem. Only when it is processed by Php does the euro symbol appear.

So if I write:


<p>
\200<br />
<?php
echo "\200";
?>
</p>

I'll get


\200

Is it a php setting somewhere that's causing me a problem?

This is troublesome since I have directory names set up as years (\2001, \2002, etc.) and I'm trying to access files in those directories. I can either figure out why php is being a pain, or take the lazy route and rename the directories. :p

adb64

5:26 pm on Oct 26, 2007 (gmt 0)

10+ Year Member



You have to escape the \ in this case so use echo "\\200" or use single quotes: echo '\200'