Solved

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

Posted on 2012-04-11
1
492 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
[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
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 37833086
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
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.

630 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