php mysql text problem  | | |
February 13th, 2007, 12:40 AM
|
#1 (permalink)
| | Super F@D Folder
Join Date: Jun 2004
Posts: 5,083
|
hey guys. I've got a web site i just designed with a mysql database back end. Any text in the database that has a ' such as "that's" will show up with a ? like "that?s". Anyone know why?
everything looks fine in phpmyadmin |
| |
February 13th, 2007, 10:02 AM
|
#2 (permalink)
| | Senior Member
Join Date: May 2003 Location: Aus, Gold Coast :)
Posts: 802
|
you can change both so you are using UTF8 - not sure if that will help it or not - just to be clear "?" does not appear in phpmyadmin? |
| |
February 13th, 2007, 11:39 AM
|
#3 (permalink)
| | Super F@D Folder
Join Date: Jun 2004
Posts: 5,083
|
? does not appear in php my admin. I have switched mysql over to utf-bin and my code is iso-8859-1 hope that helps  |
| |
February 13th, 2007, 01:22 PM
|
#4 (permalink)
| | Senior Member
Join Date: May 2003 Location: Aus, Gold Coast :)
Posts: 802
|
oops - i have only done UTF8 encoding using Visual Studio .NET - i am thinking though with how the PHP variable works that it should be able to work it out automatically (research says otherwise, check link below for info) -
but i have been thinking that " ' " should appear normally as it is a standard ASCII character - binary 39... http://au3.php.net/utf8_decode - that helps with UTF8 decoding.... a bit f'ed up way of doing considering that " ' " doesn't appear |
| |
February 13th, 2007, 02:03 PM
|
#5 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 14,984
|
Hold on, what exactly is happening?
Do you have a script inserting the data to the database?
You said that through phpMyAdmin the text shows correctly right?
Just when it is outputting data to what you are using it switches ' to ?. Is that it? |
| |
February 13th, 2007, 03:48 PM
|
#6 (permalink)
| | Super F@D Folder
Join Date: Jun 2004
Posts: 5,083
| |
| |
February 13th, 2007, 04:57 PM
|
#7 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 14,984
|
If it is fine in the database then there is something mixed up when you are trying to output it. Paste your code here.
Also, if it helps any, those are not ?'s, they look the same but they are not the same character. |
| |
February 14th, 2007, 10:24 AM
|
#8 (permalink)
| | Super F@D Folder
Join Date: Jun 2004
Posts: 5,083
|
hey ex. how can you tell (just wondering?) I'll post up some code later today. Thanks for the help man!! |
| |
February 14th, 2007, 11:38 AM
|
#9 (permalink)
| | Real gangstas sip on Yacc
Join Date: Oct 2001 Location: Suckas-ville
Posts: 4,552
|
He is right, those are what show up when a character is not in your character set. As far as how to tell opera shows a VERY different distinct character when this occurs, so it jumped right out at me.
If I change the encoding in IE to Western European windows it works fine, Unicode UTF-8 shows the false ?.
Jkrohn
__________________
Signatures blow hard
If your signature contains an ad of any kind, congratulations, you're on my ignore list.
|
| |
February 14th, 2007, 12:38 PM
|
#10 (permalink)
| | Super F@D Folder
Join Date: Jun 2004
Posts: 5,083
|
actually...it's with the text in the database. They're not normal ' characters. They're wierd... i went and created my own entry with regular apostrophes and it displays fine. Maybe because the text came from a mac? any ideas? i'd really rather not go back and have to edit these all by hand to fix this... lol |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |