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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.