Jack000/Expose

Markdown file gets swallowed due to failing "file" command

Closed this issue · 1 comments

I have a Markdown file in German. Somehow file does not like the first umlaut (all others are fine, weirdly enough — it's just that specific instance).

~/Projects » echo $LANG
en_US.UTF-8
~/Projects » echo $LC_ALL
en_US.UTF-8
~/Projects » echo $LC_CTYPE
UTF-8
~/Projects » file /Users/npiccolotto/Desktop/gallery/04\ Konferenz/L1000500.md
/Users/npiccolotto/Desktop/gallery/04 Konferenz/L1000500.md: ERROR: line 22: regexec error 17, (illegal byte sequence)

Anyway, I was able to fix it by overriding LC_ALL or unsetting all of LANG, LC_ALL and LC_CTYPE.

~/Projects » LC_ALL=C file /Users/npiccolotto/Desktop/gallery/04\ Konferenz/L1000500.md
/Users/npiccolotto/Desktop/gallery/04 Konferenz/L1000500.md: UTF-8 Unicode text, with very long lines

Not sure what the best solution here is.

seems like a good idea to fix the locale anyways, added it to the repo after testing.