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

fix: Chinese characters decoder bug #128

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

LyuLumos
Copy link
Contributor

Description

A Chinese character is typically represented by multiple bytes. During decoding, incomplete byte sequences may be encountered, resulting in garbled characters.

Linked Issues

#126

Additional context

This link might help:

whatwg/encoding#184

In theory, it might also work to cache and concatenate in advance to prevent garbled characters. However, I have found that this can only reduce but not eliminate the occurrence of garbled characters. Using a decoder for streaming transmission is a better choice.

Copy link

netlify bot commented Jan 22, 2024

Deploy Preview for chatgpt-demo-v2 failed.

Name Link
🔨 Latest commit df03d34
🔍 Latest deploy log https://app.netlify.com/sites/chatgpt-demo-v2/deploys/65ae883f041a900009b75df2

@ddiu8081 ddiu8081 merged commit 1c019ea into anse-app:main Jan 22, 2024
1 of 5 checks passed
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.

None yet

2 participants