0

I am using the sqlJocky plugin in flutter, but when i received a data the words come with special chars like ç,~, and the text have a bug of decode. any idea to convert to default code char?

var conn = await MySqlConnection.connect(s);
Results result = await (await conn
    .execute('SELECT * FROM SATISFACAO_PERGUNTAS'))
    .deStream();
print(result);

The log show me ����� when i use ç

Micael
  • 723
  • 1
  • 5
  • 7
  • 1
    Might be https://stackoverflow.com/questions/51368663/flutter-fetched-japanese-character-from-server-decoded-wrong you could also try `latin1.decode()` also imported from `dart:convert`. – Günter Zöchbauer Feb 27 '19 at 11:16
  • 1
    I solved thanks, it was a key in my.cnf of mysql server , I added a key [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] collation-server = utf8_unicode_ci init-connect='SET NAMES utf8' character-set-server = utf8 – Micael Feb 27 '19 at 21:12
  • Great! You could post it as an answer and accept it to mark the question as answered. – Günter Zöchbauer Feb 28 '19 at 03:55

1 Answers1

0

I solved thanks, it was a key in my.cnf of mysql server , I added a key [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] collation-server = utf8_unicode_ci init-connect='SET NAMES utf8' character-set-server = utf8

Micael
  • 723
  • 1
  • 5
  • 7