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 7926345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:44:34+00:00 2026-06-03T18:44:34+00:00

I am using restler PHP API to host a REST service. I am having

  • 0

I am using restler PHP API to host a REST service. I am having a problem with handling some European characters, otherwise it is working fine.

For example I have the string “Český rozhlas 1 – Radiožurnál” in a MySQL database. When the restler API converts the data in to JSON, it is converted like this “?esk\u00fd rozhlas 1 – Radio\u009eurn\u00e1l”

Here first character is converted as a question mark.

How can I convert the data properly using the restler PHP service?

  • 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-03T18:44:35+00:00Added an answer on June 3, 2026 at 6:44 pm

    When dealing with Unicode, we need to make sure we use utf-8 all the way

    First you need to make sure MySQL database is using utf-8 encoding. You can run the following sql to make sure of that

    ALTER TABLE your_table_name_here CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
    

    Next you need to make sure MySQL spits utf-8 when talking to PHP.

    You can use the following commands

    mysql_query('SET NAMES utf8');
    mysql_query('SET CHARACTER SET utf8');
    

    If you are using PDO you need to use the following instead, for connecting to the database

    $db = new PDO(
              'mysql:host=localhost;dbname=data_pdo_mysql', 'username', 'password',
              array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'")
          );
    

    After these changes, restler result should become

    "\u010cesk\u00fd rozhlas 1 - Radio\u017eurn\u00e1l"
    

    Which is valid JSON with complete data where unicode characters are escaped using unicode escape sequences.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the nice Restler REST framework to expose some resources in a database
I'm trying to build a REST api(using Restler) which takes in username and password
I'm using Restler to implement a simple REST API. Now if I need to
I'm developing an API using Luracast Restler library. All I'm looking for is to
I'm currently implementing a REST web service using CouchDB and RESTlet. The RESTlet layer
I am working with Luracast Restler API framework and am wondering how to organize
framework is here http://luracast.com/products/restler/ i'm using restler as restful api for my work, when
I am having a weird problem with a small restlet service that I am
I'm considering using Lucarast RESTler (http://luracast.com/products/restler/) My PHP class has a method called 'solve'
Okay, so I'm designing a stand-alone web service (using RestLET as my framework). My

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.