Forum Discussion

Faith128's avatar
Faith128
Regular Visitor
6 years ago

MySQL data problem in power bi

I already get MySQL data in power bi desktop.

I have some Chinese record in DB like this.

How can I decode this on power bi desktop.

Thank you.

7 Replies

  • Hey Faith128,

     

    you can't decode it since its already wrong in your database. Your table in MySql already have to show the "decoded" format. 

    You have to set the caracter set and collation of the table within MySQL BEFORE you insert any chinese characters.

     



     

    mysql> create table foo (v varchar(10)) CHARACTER SET utf8 COLLATE utf8_general_ci;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> insert into foo values('太原星河湾酒店'); Query OK, 1 row affected (0.00 sec)
    
    mysql> select * from foo;
    +-----------------------+
    | v |
    +-----------------------+
    | 太原星河湾酒店 |
    +-----------------------+
    1 row in set (0.00 sec)

     

     

     

    If this post was helpful may I ask you to mark it as solution and give it a 'thumbs up'? This will also help others

    Have a nice day!

    BR,
    Josef
    Graz - Austria

     

     

    • Faith128's avatar
      Faith128
      Regular Visitor

      Hi JosefPrakljacic, Thanks for your reply. My DB setting is already utf8_unicode_ci. But still get this. So I want to decode it on power bi desktop. Is it impossible?

      • JosefPrakljacic's avatar
        JosefPrakljacic
        Solution Sage

        When you query your MySQL Table what result do you get?

         

        Chinese Letter or some undefined Letters?