nextcloud / nextcloud/text

Some ANSI text gets converted to UTF8 with broken umlauts

Open
#5,394 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
659
Forks
133
Avg merge
1d 20h
Merged PRs (30d)
110

Description

Describe the bug
Some ANSI text gets converted to UTF8 with broken umlauts when opening and saving

To Reproduce
Steps to reproduce the behavior:

  1. Use provided ANSI file
  2. Import to NC, open with text editor
  3. You immediately see the check/tick with a blue dot (changes) made
  4. Save
  5. File is now UTF8 with broken umlauts

The interesting thing: Not all my ANSI files are affected. To be more specific: I own VCDS, a VAG diagnostic tool. This tool creates txt files with text (logging) in it. The german version contains umlauts in it. All those files are affected. I attached a example file to test with.

ansifail.zip

Expected behavior
No conversion?

Server details:

  • Nextcloud version: 27.1.3
  • PHP Version: 8.2
  • Database: MySQL8

Client details:

  • OS: Ubuntu
  • Browser: Firefox
  • Browser version: 122
  • Device: Windows, desktop

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the attached ansifail.zip in Nextcloud Text: import it, open it in the text editor, and save it. Compare the umlauts before and after the open/save cycle, then trace the import and save path to identify where the ANSI text is converted. Done means the affected German text remains readable after saving.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.