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

[Flink] Fix Multibyte Character Encoding in MultiTableCommittable Serialization #3028

Closed
wants to merge 2 commits into from

Conversation

Pandas886
Copy link
Contributor

Linked issue: close #3027

@Pandas886 Pandas886 changed the title Fix Multibyte Character Encoding in MultiTableCommittable Serialization [Flink] Fix Multibyte Character Encoding in MultiTableCommittable Serialization Mar 15, 2024
@@ -83,17 +84,18 @@ public MultiTableCommittable deserialize(int committableVersion, byte[] bytes)
int databaseLen = buffer.getInt();
byte[] databaseBytes = new byte[databaseLen];
buffer.get(databaseBytes, 0, databaseLen);
String database = new String(databaseBytes);
String database = new String(databaseBytes,StandardCharsets.UTF_8);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

database.getBytes() should use database.getBytes(UTF_8) too.

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Pandas886, Thanks for your contribution!

Can we just use DataOutputSerializer (with DataInputDeserializer) here? To simplify serialization work.

@Pandas886
Copy link
Contributor Author

Hi @Pandas886, Thanks for your contribution!您好,感谢您的贡献!

Can we just use DataOutputSerializer (with DataInputDeserializer) here? To simplify serialization work. DataOutputSerializer 1 DataOutputSerializer 1#简化序列化工作。

I'll try.

@JingsongLi JingsongLi closed this in 075d774 May 4, 2024
@JingsongLi
Copy link
Contributor

I merged your work for 0.8.0 releasing.

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

Successfully merging this pull request may close these issues.

[Bug] Incorrect Handling of String Encoding in MultiTableCommittable Serialization
2 participants