£ sign coming out as a ? on forum

Started by angiexx1, May 21, 2012, 06:07:33 PM

Previous topic - Next topic

angiexx1

Ok am a bit stumped when typing a £ sign it looks like a £ sign in the message box but when you press post and view the message the £ sign then changes itself to a ?, this is happening to all members not just one so am wondering why and what would cause this


Thanks

angie

angiexx1

oh its on a different site to mine its my partners forum but I built it and maintain it

http://streetcruiseuk.com/index.php

Arantor

It's like this because £ is not a valid character in the system that forums default to, which is called ISO-8859-1. Take a backup, then in Admin > Maintenance > Database, convert the forum to UTF-8.

Once you've done that, you'll be able to post £ happily.
Holder of controversial views, all of which my own.


MrPhil

#3
Is that a ? in a diamond sign? It means your forum is UTF-8 while your pound sign was entered in Latin-1. You just need to be consistent -- Latin-1 everywhere or UTF-8 everywhere. Consider using £ instead of typing in a hard coded character, as it will work under any encoding.

angiexx1

ok that has lost me MrPhil
the forum itself as such is not much changed just added tiny portal and a theme and a few mods and just used the £ sign above the number 3 on my keyboard as others are when typing
so if I do the change to utf-8 that should correct it?
Will give that a go will be tomorrow probably now as its late where I am

And thank you

MrPhil

Looking at your forum, it claims to be already in UTF-8 (meta charset tag). Since you ask about changing to UTF-8, can I assume that you did not set up the forum yourself? I don't seem to be able to view any posts as a guest, so I can't see how a Pound behaves. Typically, if it's an invalid character, you'll see a ? in a black diamond. Is that it? I suspect that your keyboard Pound sign is not UTF-8, and may not even be Latin-1 (ISO-8859-1).

Do other members on your forum have the same problem? I find it hard to believe that people in the UK have been using SMF for many years and have never had the ability to type in a Pound sign. Do you have an "unusual" computer and/or browser? Any uncommon add-ons or settings such as assist for handicapped typists? Maybe it just doesn't properly convert the typed-in Pound sign to the UTF-8 bytes. The more you can tell us about the system, the more likely someone will know what to do.

Note that this (SMF Community) forum is UTF-8, yet your Pound signs come out fine here. Can you think of any differences? Are you posting to this forum from the same PC and browser you use for your own forum?

Arantor

* Arantor only went to the other link referred to, not the signature one, which is definitely in ISO-8859-1...
Holder of controversial views, all of which my own.


angiexx1

MrPhil its the link in the second message I put the one Arantor went to not the one in my signiture I forgot to put the link in the first message so added it to a second one, and as Arantor is saying the forum is in ISO-8859-1... do I still convert it to utf-8
oh and Ive installed more than one forum and its never done that with the pound sigh yet
It is happening to more than one member of the forum aswell it isnt my computer or keyboard as that is fine in my own forum
its the £ sign on the keys on the number 3 not a £ in a triangle

MrPhil

OK, this is the Street Cruise site, then. It claims to be UTF-8 encoded too. In one post I see someone writing about getting four tyres for ?260.00, which I guess is an example of what you're talking about. Can you go into phpMyAdmin and see what the database is configured to be (especially the body text in the messages table)? Somewhere you should see a "collation" that includes "utf8" or "latin1". I'm puzzled as to why we don't see the standard UTF-8 black diamond error, if the Pound sign was encoded in Latin-1 or some other encoding. Is that the only character giving problems? Was this character directly typed in on your keyboard into the forum, as opposed to cut and pasted from some word processor document? Was it created in exactly the same way as your post into THIS forum (which is also UTF-8), and show the Pound correctly? Are new posts to your forum showing this problem, or only older posts (made before some conversion or change)?

angiexx1

Yeah thats what I mean but have just converted it to utf-8 in the forum and its now working fine, its something new to me and have never seen it happen on any of the other installs of smf that I have done and have done a few now.
But thank you everyone for your help will mark this topic solved

Advertisement: