Skip to content

ANSI special characters/umlauts are not escaped properly #36076

@rstephan

Description

@rstephan

Description

We have many file in ANSI/CP1252. In the PR-view or any other diff-view the german umlauts are not properly escaped. The angle bracket are at the right position, but the shown hex-data is in many cases not right.

I could reproduce the issue on the demo.gitea.com site with similar result:
https://demo.gitea.com/rstephan/test/commit/319d89dc053069cbb7a69c0c7b15a68bd7af9d3d

On our side we see everything from <> (empty), e.g. <20> (wrong value) or <EFBFBD> (replacement character).
The right value should be FC (ü in ANSI) for the demo.gitea.com example, line 1.
If we see a 2 two-digit value, is't most likely the value one or two characters in front of the actual position.

Gitea Version

1.24.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Local instance:

Image

demo.gitea.com:

Image

Git Version

1.24.7

Operating System

Windows Server 2019

How are you running Gitea?

We are running gitea in windows as normal application, no service.

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions