Solved

How can I deal with special characters in query results from mssql using php

Posted on 2013-12-05
4
379 Views
Last Modified: 2016-03-02
Hi!

I have a query that returns product description, and I have run into a problem dealing with the returned values.    This data is coming from MSSQL and I am using php to query the data.

Two specific things I have run into is data that includes a product name with a copyright signal next to it.  And the other is quotations and apostrophes that are tilted in/out instead of just the keyboard standard.  Does that make sense?

I am sure there are others . . ..

Is there anyway I can utilize these special characters?  The data is going into mysql Magento database.    If not, is there a way to get around the ? signs that are displayed instead?

Thanks!
0
Comment
Question by:lthames
[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

Expert Comment

by:Dave Baldwin
ID: 39699890
You are probably getting those characters from data that came from Microsoft Word or maybe Excel in the Windows -1252 character set.  That is very similar to Latin1 ISO-8859-1.  What character set is your web page using?
0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39699899
Is there anyway I can utilize these special characters?
Yes, of course.  You can convert them to the UTF-8 equivalents.  This article tells how.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11880-Unicode-PHP-and-Character-Collisions.html
0
 

Author Closing Comment

by:lthames
ID: 39700045
WOW . .  . . very informational.

I learned alot reading your article.

OH. . . and the adjustments I made based on the article worked!
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39701053
Great!  Thanks for the points and thanks for using EE, ~Ray
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
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…

739 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