Solved

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

Posted on 2012-04-11
1
478 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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 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 …

820 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