Solved

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

Posted on 2014-11-19
4
122 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 250 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 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

691 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