Solved

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

Posted on 2012-04-11
1
460 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
Comment Utility
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

743 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

15 Experts available now in Live!

Get 1:1 Help Now