Code Monkey home page Code Monkey logo

Comments (3)

stumpylog avatar stumpylog commented on June 15, 2024

0x00E4 is the utf16 encoding of ä. 061 + 0308 is the correct utf8 decomposition for the same character.

Basically your filesystem is using utf16, so you should figure out why and fix that.

from paperless-ngx.

tlwt avatar tlwt commented on June 15, 2024

I must openly admit: my encoding knowledge is very limited. But maybe you can make sense out of my thoughts / wild guesses:

  • To my understanding the code points for 8859-1 and UTF-16 for äöüÄÖÜ are the same. So the encoding could come from there.
  • I sometimes just copy & paste text from the PDF to the file name - maybe from there
  • The newest affected file is from around 2020-03-20.
  • I checked both server and container locale and both return UTF-8
  • Checking with a new file I can confirm that both database and file system use the UTF-8 encoding

So, maybe some historical error.

The correct way to resolve it, if I understand it right is to rename all files to the UTF-8 convention and update the database as well to reflect that?

from paperless-ngx.

stumpylog avatar stumpylog commented on June 15, 2024

That's what I would do. Strings in Python are utf8 and we're not doing anything odd with encoding. Values copied from a PDF might not be UTF-8, I guess an OCR program wouldn't know what encoding, though I would assume everything at this point is UTF-8

from paperless-ngx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.