chick3n Posted February 27, 2008 Share Posted February 27, 2008 sample text: ☼☼☼ ▬ ▬☼☼☼ my result: ☼☼☼ â–¬ % what i want: ☼☼☼ ▬ ▬☼☼☼ I parse a website and it has these extended ascii characters like above. I read in the page from CURL and get that string above. php turns it into "☼☼☼ â–¬ %" and than it gets inputed into the mySQL database as that. How can i maintain the original characters? Ive tried utf8_encode, rawurlencode, combinations of the 2. Quote Link to comment Share on other sites More sharing options...
haku Posted February 27, 2008 Share Posted February 27, 2008 There are a number of steps you have to check to make sure this will work. Mainly, you have to have consistent character settings all the way through. If you are drawing text from a database, then you have to set the database character set. You have to make sure the internal encoding for PHP is the same characterset You have to save your documents in that same characterset You have to set a meta tag at the top of your document that has that same characterset. Check all these charactersets and see if they are the same. Quote Link to comment Share on other sites More sharing options...
effigy Posted February 27, 2008 Share Posted February 27, 2008 It looks like you should be fine as long as you use UTF-8 across the board, i.e., when connecting to MySQL and as the charset in your META tag. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.