Charset nightmare

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Charset nightmare

Post by neophyte »

before the caller could finish his question � and complete his

Do you see the funny character after the word "question"? I've got a lot of those non-utf8 characters in some data. They're curly quotes (single and double) and a few others. How can I clean those out of my data?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

convert them to entity form?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

I converted them with the all_ascii function at the bottom of this page:

http://www.htmlforums.com/archive/index ... 71603.html
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The curly quotes aren't in the standard ASCII set of characters, so they will either need to be converted to entity or UTF-8 versions.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

I'm actually working on porting some simple php blog content into Drupal. I've got it working now. I converted the non-utf-8 characters to utf-8 characters. It's looking good now in Drupal.
Post Reply