Solved

PHP/JSONP/Mysql -> latin1 to ASCII on the fly

Posted on 2012-04-11
1
473 Views
Last Modified: 2012-05-04
Hi Guys,
I have a customer who is using latin1 character set in their db and I am busy making an application that gets information from the DB via PHP and returns it via JSONP

Im getting the data fine using JSONP except some rows have special chracters, example:
"Guimaraes, José"
So json_encode() doesnt like this value and just nulls it.
I would like to know if its possible, at the "MySQL Level" (my sql statement) - if its possible to convert any non ASCII characters to full ASCII so that I dont get this issue (ie, something like "Guimaraes,José" would get converted to "Guimaraes,Jose"

Thanks!
0
Comment
Question by:osirion
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 37833086
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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.

813 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

18 Experts available now in Live!

Get 1:1 Help Now