skip to Main Content

I have a field with latin1_swedish_ci collation and inserted data is visible to me as a set of question marks ????????.

enter image description here

How to convert existing (??)question mark data with original data?

Note:(???)question mark data in table in actually in gujarati language data.

I am using code-igniter,mysql and phpmyadmin

3

Answers


  1. Cause

    The default encoding for inbound connections isn’t set properly. DEFAULT CHARSET will return as utf8 however character_set_server will be something different. In the above, the character_set_server was set as latin1.

    Resolution

    Set default-character-set=utf8, as detailed in
    Configuring Database Character Encoding.

    Login or Signup to reply.
  2. Try changing the column’s character set
    sample code is below.

    ALTER TABLE `your_table` 
    CHANGE COLUMN `name` `name` VARCHAR(45) 
    CHARACTER SET 'utf8' NULL DEFAULT NULL ;
    

    Note:
    When records are already ??????? in the table, the data to be reinserted again.

    The existing data will not change once collation changes.

    Login or Signup to reply.
  3. Most probably you can change the collation through the phpmyadmin page

    Follow this steps

    1) Select you database

    2) Go to Operations in the menu

    3) Scroll Down to the bottom and you will see the collation

    Change the collation and click GO

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search