Solved

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

Posted on 2014-11-19
4
105 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 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 108

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
php call to a non-object 3 32
Mysql sync between 3-4 mysql db 4 25
form button worked now it doesnt anymore 9 41
datetime in sql 6 25
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

910 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

22 Experts available now in Live!

Get 1:1 Help Now