Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
lucfarm
Contributor II
Contributor II

tDBinput Mysql writes strange characters (not latin) in tDBOutput mysql

Hi everyone,

 

I inserted 2 components in my Designer area, a tDBInput and a tDBoutput in order to get data from an exernal DB and insert this data into another database.

Both databases have collation utf8_general_ci. I inserted inside the component parameters &characterEncoding=UTF-8 (I tried also &characterEncoding=utf8), but when I check data on my target DB, some fields with non latin characters are written with strange symbols (see the screenshot).

What did i do wrong?

Labels (2)
1 Solution

Accepted Solutions
lucfarm
Contributor II
Contributor II
Author

I got it!
I inserted in my.cnf file on the target Database these lines:

[MySQLD]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

and now all the data are saved in the right way.

We can set this post solved!
Thanks!

View solution in original post

11 Replies
Anonymous
Not applicable

Hi,

 

    Could you please add below parameters?

 

characterEncoding=utf8&characterSetResult=utf8&useUnicode=true

Please read the below post as reference.

 

https://community.talend.com/t5/Design-and-Development/resolved-Encoding-problems-during-conversion-...

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

 

 

lucfarm
Contributor II
Contributor II
Author

Hi nikhilthampi,

 

thank you for your answer.

I tried and followed the post you suggested me, but still not working.

I added the parameters to the component as suggested (see the attached file).

I don't know what I can do...


chars.JPG
design.JPG
parameters_new.JPG
Anonymous
Not applicable

Hi,

 

    Could you please print the output to console and see whether its getting extracted from source correctly? If its working fine, could you please add the details to target output too.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

 

lucfarm
Contributor II
Contributor II
Author

How I can enable the printing of the iutput to the console?
Anonymous
Not applicable

Hi,

 

    Please connect the data from tDBInput to a tLogrow to print the data to console.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

lucfarm
Contributor II
Contributor II
Author

Hi,

in the logs the strings are written correctly (with the correct
characters).
I think it's a target Database issue.
I'll figure out the reason why and let you know.

Thank you
Anonymous
Not applicable

Perfect! 

 

Please check the language set configured in your target DB. Once its configured for UTF characters, most probably the error will disappear.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

lucfarm
Contributor II
Contributor II
Author

I got it!
I inserted in my.cnf file on the target Database these lines:

[MySQLD]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

and now all the data are saved in the right way.

We can set this post solved!
Thanks!

Anonymous
Not applicable

Thanks for the update.

 

Could you please mark the posts which have helped you to resolve this issue?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved