zq29 Posted October 17, 2007 Share Posted October 17, 2007 It seems that sometimes when I use the pound symbol (£) I get a  symbol prepended to it, but when this happens I can't seem to prevent it - I can't figure out what's making this happen - Has this happened to anyone else before? Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/ Share on other sites More sharing options...
Daniel0 Posted October 17, 2007 Share Posted October 17, 2007 Is it when you're typing or is it in like a database or script? Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/#findComment-371524 Share on other sites More sharing options...
effigy Posted October 17, 2007 Share Posted October 17, 2007 It's the UTF-8 encoding; see pound. You'll often see the "Â" when working with lower code points. Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/#findComment-371526 Share on other sites More sharing options...
zq29 Posted October 17, 2007 Author Share Posted October 17, 2007 I see, so would this be caused by having the following meta tag, or something else? <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/#findComment-371528 Share on other sites More sharing options...
effigy Posted October 17, 2007 Share Posted October 17, 2007 That shouldn't be causing it, but it's possible the browser could be overriding it. Is anything else using UTF-8? Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/#findComment-371545 Share on other sites More sharing options...
zq29 Posted October 17, 2007 Author Share Posted October 17, 2007 I haven't coded anything to specifically use UTF-8, although, this pound sign is being used in the content of an e-mail that is being generated by my script, but sent using the phpmailer class - So, I guess there's the possibility that either that class is encoding it's output in UTF-8, or it's down to my mail client? Will have a quick poke around in the phpmailer class, though I had this issue the other day on another project, where certain parts of the site would display the symbol fine, and other places I would get the same problem, but I wasn't doing anything out of the ordinary to cause the issue... EDIT: No, phpmailer is using iso-8859-1 encoding too. Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/#findComment-371551 Share on other sites More sharing options...
effigy Posted October 17, 2007 Share Posted October 17, 2007 Possibly. I would insert various echo statements throughout to find the culprit. Where does the data originate from? User input? A database? A file? Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/#findComment-371555 Share on other sites More sharing options...
zq29 Posted October 17, 2007 Author Share Posted October 17, 2007 Just me typing it into my script - That's why I'm having difficulty understanding why this is happening! <?php //... $content = "Your quote:\r\n\r\n". "Width: $width metres\r\n". "Length: $length metres\r\n". "Location: $location\r\n". "Surface: $s[name]\r\n\r\n". "Quote: GBP £$total\r\n". "Ref: $ref"; //... ?> Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/#findComment-371560 Share on other sites More sharing options...
effigy Posted October 17, 2007 Share Posted October 17, 2007 I'm not sure how PHP files are interpreted yet in terms of "high ascii" characters. This could be locale or server related. Does Apache have AddDefaultCharset? What about the e-mail programs? Is PHP Mailer explicitly setting a character set for the receiving end? Quote Link to comment https://forums.phpfreaks.com/topic/73646-%C3%A2-symbol-being-prepended-to-my-%C2%A3-symbols-ideas/#findComment-371571 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.