home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

php mysql text problem

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2530
Discussions: 200,996, Posts: 2,379,946, Members: 246,364
Old February 13th, 2007, 12:40 AM   Digg it!   #1 (permalink)
Super F@D Folder
 
Join Date: Jun 2004
Posts: 5,083
Send a message via AIM to sr71000
php mysql text problem

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
sr71000 is offline   Reply With Quote
Old February 13th, 2007, 10:02 AM     #2 (permalink)
Senior Member
 
Join Date: May 2003
Location: Aus, Gold Coast :)
Posts: 802
Send a message via ICQ to exally
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?
exally is offline   Reply With Quote
Old February 13th, 2007, 11:39 AM     #3 (permalink)
Super F@D Folder
 
Join Date: Jun 2004
Posts: 5,083
Send a message via AIM to sr71000
? 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
sr71000 is offline   Reply With Quote
Old February 13th, 2007, 01:22 PM     #4 (permalink)
Senior Member
 
Join Date: May 2003
Location: Aus, Gold Coast :)
Posts: 802
Send a message via ICQ to exally
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
exally is offline   Reply With Quote
Old February 13th, 2007, 02:03 PM     #5 (permalink)
SoMuchAnime-SoLittleTime
 
EXreaction's Avatar
 
Join Date: Aug 2003
Location: Plymouth, WI
Posts: 14,984
Blog Entries: 1
Send a message via MSN to EXreaction
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?
__________________
My photography: Flickr

Lithium Studios - phpBB3, PHP, and Web Development
EXreaction is offline   Reply With Quote
Old February 13th, 2007, 03:48 PM     #6 (permalink)
Super F@D Folder
 
Join Date: Jun 2004
Posts: 5,083
Send a message via AIM to sr71000
exactly ex. I build the php scripts to do it myself. For example...u can see the site here http://71.232.240.29/Site/pages/revi...Joe%20Firstman

like i said..in the database it all appears fine! any thoughts??
sr71000 is offline   Reply With Quote
Old February 13th, 2007, 04:57 PM     #7 (permalink)
SoMuchAnime-SoLittleTime
 
EXreaction's Avatar
 
Join Date: Aug 2003
Location: Plymouth, WI
Posts: 14,984
Blog Entries: 1
Send a message via MSN to EXreaction
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.
EXreaction is offline   Reply With Quote
Old February 14th, 2007, 10:24 AM     #8 (permalink)
Super F@D Folder
 
Join Date: Jun 2004
Posts: 5,083
Send a message via AIM to sr71000
hey ex. how can you tell (just wondering?) I'll post up some code later today. Thanks for the help man!!
sr71000 is offline   Reply With Quote
Old February 14th, 2007, 11:38 AM     #9 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,552
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
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.
jkrohn is offline   Reply With Quote
Old February 14th, 2007, 12:38 PM     #10 (permalink)
Super F@D Folder
 
Join Date: Jun 2004
Posts: 5,083
Send a message via AIM to sr71000
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
sr71000 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me with php, and mySQL EXreaction Webmastering and Programming 6 February 13th, 2006 01:00 AM
PHP / MySQL coding help VillageIdiot906 Webmastering and Programming 3 February 22nd, 2005 11:54 PM
mysql/php-blank jomoal99 Webmastering and Programming 2 August 16th, 2004 06:48 AM
Dreamweaver/PHP/MySQL Help paulknapp Webmastering and Programming 1 June 20th, 2004 02:26 PM
Database using MySQL and PHP Praetorian Webmastering and Programming 5 December 9th, 2001 05:32 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3092)
Foxconn Blackops x48 MoBo (5)
Charges against non-tippers dropped.. (22)
Health Care Rationing (16)
Nvidia GTX 260 problem (14)
Delete an OS (17)
Laptop with wireless problem. (13)
Wireless Televisions. (12)
windows vista security holes (19)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (9)
[F@H SPAM 11/16/09] ! 1/2 months to.. (41)
windows 7 problem (7)
Recent Discussions
add ram to existing (1)
Need help getting speakers to work (2)
Nvidia GTX 260 problem (14)
Laptop with wireless problem. (13)
Point and Shoot Camera Suggestions. (9)
Is the PSU I received dead? (16)
FreeAgent drive software not x64 comp.. (1)
Intel 5100 AGN issues fixed yet? (28)
Foxconn Blackops x48 MoBo (5)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (41)
Print spooler problem (17)
Q9650 vs. Q9550 (2)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Size after cutting 700Mb file is 2.5 .. (0)
Delete an OS (17)
windows vista security holes (19)
updating BIOS via winflash, claims fi.. (1)
New Server Configuration Suggestions (0)
cheap gaming laptop? (12)
Unallocated Space (2)
help me pls laptop just stopped worki.. (1)


All times are GMT -4. The time now is 11:32 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28