Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese garbled(中文乱码),The Chinese description of the field in the mysql database is garbled, #3157

Closed
fanhl opened this issue Aug 25, 2021 · 15 comments
Labels
question Question

Comments

@fanhl
Copy link

fanhl commented Aug 25, 2021

image

@fanhl fanhl added the question Question label Aug 25, 2021
@SakuraAxy
Copy link

I also encountered this problem and tried adding source.optons.encoding: utf-8
But it doesn't work and problems still happen

@Light310
Copy link

Looks like cyrillic also broken

@dexter-mh-lee
Copy link
Contributor

We recently updated init.sql to take in UTF8, but it doesn't convert existing ones. In the meantime can you try running

ALTER TABLE metadata_aspect_v2 CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

In the MySQL db?

@itc180016
Copy link

I just updated Datahub to V0.8.11, and using PostgreSQL. The same problem was encountered. What should I do?

@NightCat000
Copy link

I also need to resolve the situation which don't support the chinese charset.

@1ambda
Copy link

1ambda commented Aug 28, 2021

Hi, after upgrading to 0.8.11 w/ Postgres, encountered the same problem.

  • dataset name, description, user name, ...

Datahub encoding is UTF-8.

SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname = 'datahub_prod';

> UTF-8

And created database using `ko_KR.UTF-8'.

CREATE DATABASE datahub_prod OWNER xxx ENCODING 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'ko_KR.UTF-8' TEMPLATE template0;

@dexter-mh-lee
Copy link
Contributor

Just to clarify. Do you see it correctly added to the MySQL/Postgres DB, but see bad decoding in the UI? or is it incorrectly ingested in the first place? @itc180016 @NightCat000 @1ambda

@dexter-mh-lee
Copy link
Contributor

Hi everyone. We identified the issue. We will fix it asap and cut a release

@1ambda
Copy link

1ambda commented Aug 31, 2021

Hi, @dexter-mh-lee

In my case, We can see the text in DB and ES clearly in the original encoding, but Seems UI or API doesn't handle them correctly. and It's first time. It happened after upgrading to 0.8.11.

@NightCat000
Copy link

NightCat000 commented Aug 31, 2021

I already have solved the problem,if you want to know how to solve,please clicking folowing:
https://blog.nowcoder.net/n/df53c7e3699d4828bcc1084f7e11bd36

@Echelon77
Copy link

I already have solved the problem,if you want to know how to solve,please clicking folowing:
https://blog.nowcoder.net/n/df53c7e3699d4828bcc1084f7e11bd36

It doesn't work for me. Maybe the reason is that the header of frontend reponse not set utf8, it responsed this: 'text/plain; charset=ISO-8859-1'

@NightCat000
Copy link

I already have solved the problem,if you want to know how to solve,please clicking folowing:
https://blog.nowcoder.net/n/df53c7e3699d4828bcc1084f7e11bd36

It doesn't work for me. Maybe the reason is that the header of frontend reponse not set utf8, it responsed this: 'text/plain; charset=ISO-8859-1'

I don’t know clearly why you are ,maybe you need to build new datahub after fixed it 。

@Echelon77
Copy link

I already have solved the problem,if you want to know how to solve,please clicking folowing:
https://blog.nowcoder.net/n/df53c7e3699d4828bcc1084f7e11bd36

It doesn't work for me. Maybe the reason is that the header of frontend reponse not set utf8, it responsed this: 'text/plain; charset=ISO-8859-1'

I don’t know clearly why you are ,maybe you need to build new datahub after fixed it 。

Yes,I pull the latest code and rebuild a new docker image, now it's solved.

@shirshanka
Copy link
Contributor

This has been fixed via #3168 and is now available on head as @Echelon77 mentioned.

We will cut a release (0.8.12) that contains this fix by end of this week.
Please re-open if that doesn't resolve it.

@1ambda
Copy link

1ambda commented Sep 10, 2021

It's fixed after upgrading to 0.8.12 :) Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

9 participants