Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9043629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:46:32+00:00 2026-06-16T10:46:32+00:00

I want to retrieve some data from a MySQL database in a JSON format.

  • 0

I want to retrieve some data from a MySQL database in a JSON format.

My tables have the collation set to utf8_general_ci. And In my PHP code I have this code:

/* change character set to utf8 */
if (!$mysqli->set_charset("utf8")) {
    printf("Error loading character set utf8: %s\n", $mysqli->error);
} else {
    printf("Current character set: %s\n", $mysqli->character_set_name());
}

But when the page is retrieved by the browser, words with accents aren’t shown properly. For instance, a “á” is presented as “\u00e1”.

What am I missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:46:33+00:00Added an answer on June 16, 2026 at 10:46 am

    You are simply looking at encoded JSON, there isn’t a real problem. When you decode the JSON, you will get á again.

    $a = json_encode( 'á' );
    echo $a; //'"\u00e1"'
    echon json_decode( $a ); // 'á' 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a logic-thinking problem. I retrieve data from a php file over json
I have a Silverlight application that needs to retrieve some data from my database.
I have some tables in a MySQL database to represent records from a sensor.
I want to get data from the database (MySQL) by JPA, I want it
I have some data from database coming out in a loop. Each of these
I have saved some information in database with MySQL, now i want to show
If I want to gather some data from the database and use it in
i want to retrieve some data from this website: http://sites.target.com/site/en/spot/search_results.jsp?&mapType=enhanced&startAddress=72756&startingLat=36.322757720947266&startingLong=-93.99922943115234&_requestid=2573952 There are following lines
I want to start several threads, retrive data from net, perform some actions with
My app is calling a web service to retrieve some data, and I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.