?
Solved

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

Posted on 2014-11-19
4
Medium Priority
?
124 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 40454329
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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 total points
ID: 40454785
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
ID: 40456443
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
ID: 40456553
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

801 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