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

Detect truncated utf-8 characters at the end of content as still representing utf-8 (#19773) #19774

Merged
merged 1 commit into from
May 21, 2022

Commits on May 21, 2022

  1. Detect truncated utf-8 characters at the end of content as still repr…

    …esenting utf-8 (go-gitea#19773)
    
    Backport go-gitea#19773
    
    Our character detection algorithm can potentially incorrectly detect utf-8 as iso-8859-x
    if there is a truncated character at the end of the partially read file.
    
    This PR changes the detection algorithm to truncated utf8 characters at the end of the
    buffer.
    
    Fix go-gitea#19743
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed May 21, 2022
    Configuration menu
    Copy the full SHA
    ba89a48 View commit details
    Browse the repository at this point in the history