Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Database charset is using latin1, while limesurvey uses utf8

Database charset is using latin1, while limesurvey uses utf8 il y a 1 an 11 heures #101026

  • hotsun
  • Portrait de hotsun
  • Hors ligne
  • Fresh Lemon
  • Messages : 3
  • Karma: 0
I didn't notice that I need to set database charset to utf8 for limesurvey, and all users' Chinese input became "???" on the database. I tried to convert the data but either of them work:
select CONVERT(CONVERT(CONVERT(576941X16X538SQ002 USING utf8) USING binary) using latin1) from `lime_survey_576941_bak` WHERE id=42;
select CONVERT(CONVERT(CONVERT(576941X16X538SQ002 USING latin1) USING binary) using utf8) from `lime_survey_576941_bak` WHERE id=42;

This one didn't work either:
mysql> alter table lime_survey_576941_bak2 modify column 576941X16X538SQ002 text CHARACTER SET binary;
Query OK, 6825 rows affected (0.08 sec)
Records: 6825 Duplicates: 0 Warnings: 0

mysql> alter table lime_survey_576941_bak2 DEFAULT CHARSET=utf8,modify column 576941X16X538SQ002 text CHARACTER SET utf8;
Query OK, 6825 rows affected, 5 warnings (0.08 sec)
Records: 6825 Duplicates: 0 Warnings: 5

Is there any way to get back the original users' input Chinese data?
Thanks in million!
Dernière édition: il y a 1 an 11 heures par hotsun.
L'administrateur a désactivé l'accès en écriture pour le public.

Database charset is using latin1, while limesurvey uses utf8 il y a 1 an 7 heures #101030

  • c_schmitz
  • Portrait de c_schmitz
  • Hors ligne
  • LimeSurvey Team
  • Messages : 810
  • Remerciements reçus 115
  • Karma: 93
Rather try eporting the data using a tool like phpMyAdmin, then user a proper text editor to convert the charset so you can see and check the result immediately, then import again.
In the worst case scenario the upper bit range of the characters got lost. Best case scenario is that you manage to get it converted.
Support us, too. Donate to the LimeSurvey project and help keep us going!
Dernière édition: il y a 1 an 7 heures par c_schmitz.
L'administrateur a désactivé l'accès en écriture pour le public.

Database charset is using latin1, while limesurvey uses utf8 il y a 1 an 4 heures #101038

  • hotsun
  • Portrait de hotsun
  • Hors ligne
  • Fresh Lemon
  • Messages : 3
  • Karma: 0
It doesn't work. All Chinese are still question marks "???".
Did the data format broken when inserting the data in this case? :(
L'administrateur a désactivé l'accès en écriture pour le public.

Database charset is using latin1, while limesurvey uses utf8 il y a 1 an 1 heure #101055

  • c_schmitz
  • Portrait de c_schmitz
  • Hors ligne
  • LimeSurvey Team
  • Messages : 810
  • Remerciements reçus 115
  • Karma: 93
Yes, that's most likely :-(. I am really sorry.
Was this a new install or an old installation updated to a newer version?
Support us, too. Donate to the LimeSurvey project and help keep us going!
L'administrateur a désactivé l'accès en écriture pour le public.

Database charset is using latin1, while limesurvey uses utf8 il y a 11 mois 3 semaines #101338

  • hotsun
  • Portrait de hotsun
  • Hors ligne
  • Fresh Lemon
  • Messages : 3
  • Karma: 0
it was a new installation. We lost lots of user data sadly...
L'administrateur a désactivé l'accès en écriture pour le public.

Database charset is using latin1, while limesurvey uses utf8 il y a 11 mois 3 semaines #101339

  • c_schmitz
  • Portrait de c_schmitz
  • Hors ligne
  • LimeSurvey Team
  • Messages : 810
  • Remerciements reçus 115
  • Karma: 93
Somebody must have changed the database charset because usually at installation the default charset of the database it set to UTF-8.
Maybe the database was moved or restored.
Support us, too. Donate to the LimeSurvey project and help keep us going!
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.124 secondes
Donation Image