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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:03:13+00:00 2026-06-07T21:03:13+00:00

I’ve such a problem , first take a look at mysql table => CREATE

  • 0

I’ve such a problem , first take a look at mysql table =>

CREATE TABLE IF NOT EXISTS users(
id int(4) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(40) CHARSET utf8 COLLATE 'utf8_unicode_ci' NOT NULL,
surname VARCHAR(40) CHARSET utf8 COLLATE 'utf8_unicode_ci' NOT NULL,
);

It is storing data successfully , but when I’m trying to retrieve this info to my .php file (which encoding is also utf8) it still showing me question marks (?????), why ? How can I solve it ?

UPDATE

Something I’m not doing well. So I’ve 2 php files, one is classA.php file in which I’ve defined class which is retrieving info from database and I’ve included this file (classA.php) into my default.php file where I want to see data.
I’ve exactly same table which is written above , and I’m writing

header('Content-Type: text/html; charset=UTF-8');

in the first line in default.php, but it still doesn’t work, thanks for advices :))

SECOND UPDATE

This script I’ve in classA.php file , and its encoding is default like default.php file encoding. I just added in default.php file in first line this

header("Content-Type: text/html; charset=UTF-8");

but it still doesn’t work.

Third update

sql =>

create table ok(
id int(2) not null auto_increment primary key,
name varchar(20) charset utf8 not null);

and php file

<?php
 header('Content-Type: text/html; charset=UTF-8');
 ?>
 <!DOCTYPE html>
 <html>
 <head>
        <title>hello</title>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
     <body>


     <?php
        $con = mysqli_connect("host","user","pass","db");

       if (mysqli_connect_errno()==0){
       if ($r = mysqli_query($con,"SELECT * FROM ok")){
    mysqli_set_charset($con,"utf8");
    while ($d = mysqli_fetch_assoc($r)){
        echo $d['name'] . "<br>";
           }
           }
          }

            if (isset($con)){
               mysqli_close($con);
             }
             ?>


               </body>
               </html>

I’ve inserted in ok table this=>

insert into ok(name) values("one"),("ერთი"),("two"),("ორი");

PS. special characters are Georgian 🙂

and it results English characters fine and Georgians with question marks 🙁

It doesn’t work anyways 🙁

  • 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-07T21:03:14+00:00Added an answer on June 7, 2026 at 9:03 pm

    The fact that the PHP file is in UTF-8 doesn’t necessarily mean that the data coming from/ going to the database is in UTF-8 too.

    You didn’t mention which extension you’re using, but:

    • For mysql use mysql_set_charset($link,'utf8');

    • For mysqli use mysqli->set_charset('utf8') or the same as above with mysqli_

    • For PDO, when you connect include charset:utf8 in the DSN string.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am currently running into a problem where an element is coming back from
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm making a simple page using Google Maps API 3. My first. One marker
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

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.