I have some 400 word articles in mysql table containing a few random quotes here or there like: "blah" or 'blah'. When I call on the table to be displayed it displays the contents of the article but each quote inside is displayed like this: �blah� or �blah�. I've tried a few different ways of displaying it with no luck, I think i have the wrong idea of what needs to be fixed. If it helps I am currently not using "echo" to display the article. I am using sprintf and %s due to multiple pieces of data being needed.
this has to do with a non binary file transfer in ftp, set your ftp client to binary and you should have the issue solved
eh, I'm pretty confused by that. I looked around my ftp client on bluehost but i didn't see anything like that. Are you sure this has anything to do with ftp and not the mySQL database?
This might help, but of course I'm unsure... You mentioned that you have 400 Word (assume MS Word) documents. I see these "glaring gotchas" a lot these days and it's rather disconcerting to see them on "top level" sites. This might be an indication that MS Word and Microsoft are as ubiquitous as we were led to believe! Content creators the world over must be using Word for their content creation and editing. Duh!!! The problem might stem from Word using what they term "Smart quotes" (which are just UNICODE) and your database and/or table collation is not set properly. The characters in question are: ‘ (U+2018) LEFT SINGLE QUOTATION MARK ’ (U+2019) RIGHT SINGLE QUOTATION MARK “ (U+201C) LEFT DOUBLE QUOTATION MARK †(U+201D) RIGHT DOUBLE QUOTATION MARK If your database/table collation is not set correctly and you can't change it, you may need to convert these to straight quotes and apostrophes before inserting the data. Also look at add_slashes(), mysql_real_escape_string(), and the real_escape_string() method of the mysqli class if you're using that for your database operations. You might also want to check the value of magic_quotes_gpc in your php.ini file. First thoughts...
he is talking about the file itself not the table it happened to me before when i transfer my files via ftp, one way to try the binary method is to use a ftp client like filezilla try it on one file to test the results because i know that changing each variable is an amazing pain. I actually got a program to replace all occurrences of characters in files to fix mine at one point.
Nope. There is no file, unless your talking about the index file where I echo the article. I have an article which is stored in a row and column in a table on my mySQL database. I then call on this article to be echoed using a simple sprintf command using php. When it is displayed on the site, every " and ' is replaced with a �