bibtex-tidy icon indicating copy to clipboard operation
bibtex-tidy copied to clipboard

Option to un-escape characters

Open aubertc opened this issue 2 years ago • 4 comments

Right now, the following options are offered:

  --escape, --no-escape
      Escape special characters, such as umlaut. This ensures correct typesetting
      with latex. Enabled by default.

Would it be possible to add a third option, "--unescape", that replaces e.g. {\"{u}} with ü?

As far as I can tell, incompatibilities in character encoding is a matter of the past (ish), so getting the other way around would be nice too.

aubertc avatar Mar 14 '22 16:03 aubertc

As far as I can tell, incompatibilities in character encoding is a matter of the past (ish), so getting the other way around would be nice too.

Do you know any more about this? This answer on stack exchange suggests bibtex is not unicode aware, but the other answer suggests support can be added using \usepackage[utf8]{inputenc}.

FlamingTempura avatar Mar 15 '22 10:03 FlamingTempura

Thanks for your comment. The answer you are linking to dates from 2009. Most of the sources I can find dates back to ~2010 and highlight issues, but as no recent post that I could find list encoding as a problem, I suspect it "went away" thanks to better unicode support.

Further evidence:

biber handles us-ascii, 8-bit encodings such as Latin 1, and utf-8. It features true Unicode support and is capable of reencoding the bib data on the fly in a robust way.

Unfortunately, I could not find an authoritative answer…

aubertc avatar Mar 15 '22 13:03 aubertc

Unfortunately, I could not find an authoritative answer… As is the way with bibtex!

Thanks for checking. I can certainly see unescape as a useful option (particularly for biber/biblatex). I will try to find some time to work on it or will be happy to accept a PR.

FlamingTempura avatar Mar 15 '22 13:03 FlamingTempura

I just came here to suggest the same feature proposed by @aubertc. I am using the BibTeX files to generate csv data for later publishing, so my objectives are increasing the reading and searching capability of the resulting data, and not being compliant with latex. In this case an --unescape feature would be perfect for me!

Thank you @FlamingTempura for considering it.

pedropaulofb avatar May 17 '22 07:05 pedropaulofb