By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,304 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,304 IT Pros & Developers. It's quick & easy.

Echoing Language Characters

chunk1978
100+
P: 224
hi there... can someone tell me how i can display my echo statement correctly? i'm using french characters but the output is crazy...

my php code:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. echo "Montréal";
  3. ?>
  4.  
the result:

Expand|Select|Wrap|Line Numbers
  1. Montréal
  2.  
i really hope there's a simple fix to this...
Apr 29 '07 #1
Share this Question
Share on Google+
3 Replies


NevadaSam
P: 3
replace the "é" with "&eacute;"

echo "Montr&eacute;";

It will print out the way you want it then.

Sam
Apr 30 '07 #2

chunk1978
100+
P: 224
replace the "é" with "&eacute;"

echo "Montr&eacute;";

It will print out the way you want it then.

Sam
hi sam thanks for the response... i figured this out earlier though and forgot to repost... i just encoded my HTML and PHP script outputs with charset=UTF-8... so i can write "Montréal" and not have to write "Montr&eacute;", or worry about all the other special french characters ;-)...

horay for unicode text encoding!!! :-p
Apr 30 '07 #3

NevadaSam
P: 3
Glad you got it going.

Sam
;
Apr 30 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.