Open Atemu opened 3 days ago
I figured out that json.dumps()
makes this happen by default and you need to turn it off using the ensure_ascii = False
parameter. I could not figure out how to apply this to unflatten.py
yet.
Edit: I did figure it out, I just messed up in the implementation and python didn't scream at me... O.o
Repro:
When you diff what
ncdu -o
exports of the same directory, the JSON contains the emoji as a raw unicode codepoints while bothfind2flat
andunflatten
convert it to\ud83e\udde1
. This is indeed what's makingncdu
crash as manually editing the ncdu-export-generated JSON to change it back to a raw unicode codepoint does not crash.Interestingly, other unicode codepoints such as
ä
(\u00e4
) do work.This might actually be a bug in ncdu, though it wouldn't trigger it on its own of course since it'd put the raw codepoints into the JSON.