Skip to content

Conversation

orisano
Copy link
Contributor

@orisano orisano commented Aug 24, 2021

The go-json stream decoder has a buffer, but it may keep the end as utf8 which is not correct.
If you decode it as a string, it will be regarded as RuneError.
If the length is not long enough, you need to read it additionally from the reader.
I fixed the problem.

@codecov-commenter
Copy link

Codecov Report

Merging #279 (e1e6c41) into master (deb13af) will increase coverage by 0.00%.
The diff coverage is 83.33%.

@@           Coverage Diff           @@
##           master     #279   +/-   ##
=======================================
  Coverage   81.32%   81.32%           
=======================================
  Files          47       47           
  Lines       15523    15529    +6     
=======================================
+ Hits        12624    12629    +5     
- Misses       2339     2340    +1     
  Partials      560      560           

@goccy
Copy link
Owner

goccy commented Aug 25, 2021

Thank you for the great PR ! LGTM !

@goccy goccy merged commit 8ebef3b into goccy:master Aug 25, 2021
@orisano orisano deleted the fix-utf-8-handling branch August 25, 2021 02:20
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.

3 participants