Jump to content

Strange Characters


jason97673

Recommended Posts

Not sure if this would be in the right category because it could be a database, PHP, or HTML problem.

 

I dont know how to explain with words, so look at the attached picture.

 

http://sykotic-designz.org/strange.JPG

 

That is basically just an article stored in a DB. Now you see those strange characters? Is there a way to get rid of them? Basically all the data entered in the system has been copied and pasted which I know makes those characters appear because when I copy " ' " from a PDF to a text file it displays weird also.

 

I dont know if I should change the type of field in the Database from text to varchar or text to something else perhaps, or something in the PHP code I use can get rid of those.

 

Any help appreciated, thanks.

Link to comment
https://forums.phpfreaks.com/topic/60565-strange-characters/
Share on other sites

Eh, no, not manually.  Once you figure out what character you need to replace, just run UPDATE table SET column=REPLACE(column, CHAR(?), "'") on the table where ? will be the ASCII code of the character you need to replace.

 

You'll probably have to figure out the ASCII value manually.  You can just make a new entry in the table with ONLY a weird character as the content and maybe do a SELECT ORD(content) FROM table WHERE id=?....

 

Let me know if it works.

Link to comment
https://forums.phpfreaks.com/topic/60565-strange-characters/#findComment-301315
Share on other sites

Hm well actually, I got help somewhere else and in my HTML I just had to change

 

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

 

to

 

<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />

 

And that fixed everything, but thanks for the help anyway!  ;D

Link to comment
https://forums.phpfreaks.com/topic/60565-strange-characters/#findComment-301656
Share on other sites

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.