Jump to content

Certain characters not showing right?


br3nn4n

Recommended Posts

Using just a simple form to enter in the data to a mysql database, on some computers after entering the data it displays on the site as something like this:

 

students’

 

where the "’" should be an " ' ". Any way to fix this without having to go back in and edit every one of the occurances?

Link to comment
https://forums.phpfreaks.com/topic/98029-certain-characters-not-showing-right/
Share on other sites

Is the data being copied and pasted from text editors or something? I've run into that problem before as different text editors or document programs (like MS Word) us different encodings to store the data.

 

If you're running into the problem while grabbing data from a textarea or input, try using htmlspecialchars()

You got it, dead on :D the text is being copied from PDF files which are put together in a page designer program that supports special characters like Word uses. Often the text IS copied directly from Word docs, actually.

 

So running it through htmlspecialchars() would do what? My site is set to iso-8859-1, i'll have to check on the database.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.