Solved

qoutes don't display correctly on page after change to  charset=utf-8

Posted on 2014-11-19
4
102 Views
Last Modified: 2014-11-20
When I copy text from wordperfect the single and double quotes don't display properly. I know there is a setting in wordperfect for the world wide web that will fix this, but not everyone who uploads to my site is going to change that setting.

I recently changed the meta tag which caused this trouble.
was:  charset=ISO-8859-1
now:  charset=utf-8

Is there a common fix for this? thanks.
0
Comment
Question by:kadin
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 250 total points
Comment Utility
WordPerfect and Word use what are called 'smart quotes' which are in the Latin1/Windows1252/ISO-8859-1 character sets in the same code positions.  UTF8 puts them somewhere else.  If you want to use UTF8 then you will have to translate the 'smart quotes'.  There is a routine on this page http://shiflett.org/blog/2005/oct/convert-smart-quotes-with-php to do that.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
Comment Utility
This is a character set encoding issue.  This article explains what is happening and what you can do about it.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11880-Unicode-PHP-and-Character-Collisions.html
0
 

Author Comment

by:kadin
Comment Utility
Thank you both for your responses.

I can't replicate the problem and therefore cannot test your solutions. The problem started when I changed meta data in header:

was:  charset=ISO-8859-1
now:  charset=utf-8

Text that was already in database from one of my users started displaying on web page with ? instead of "" and ''. When I copy that same text from database and re-upload it to new row in DB. and then display on new web page, the quotes display like non-computer (made for paper) quotes, that is, they look just fine (displayed at a slant instead of replaced with a question mark), and would print on paper well, which is what word perfect is designed for - as you know computer quotes display vertically instead of a slant.

I created slanted quotes in wordperfect and upload and they display just fine.
I am starting to wonder if there is no problem. Maybe only text that was uploaded during when charset=ISO-8859-1 was in charge will display with ?. But now that charset=utf-8 is in charge, any NEW uploads of old style made for paper quotes from wordperfect for example, will be formatted upon upload and display just fine.

Ray, I tested your test characters, and they display just fine.

'Françoise'
, 'Å-Ring'
, 'ßeta or Beta?'
, 'Öh löök, umlauts!'
, 'ENCYCLOPÆDIA'
, 'ça va! mon élève mi niña?'
, 'A stealthy ƒart'
, 'Ðe lónlí blú bojs'
0
 

Author Comment

by:kadin
Comment Utility
I copied the problem text from one column to another and it displays bad. I copy that same problem text to an upload form and then display it and it displays good. It looks like anything uploaded from this point on using utf-8 will display good, there fore problem solved. Thanks for your help.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now