jgm / djot.js

JavaScript implementation of djot
MIT License
146 stars 16 forks source link

Request for djot supporting Latin 1 if encoding isn't UTF-8 #25

Open tbdalgaard opened 1 year ago

tbdalgaard commented 1 year ago

I wonder if Djot can support Latin 1 as an alternative text encoding when converting between formats. Can I do something about this myself via Pandoc, or should this be handled directly through Djot?

jgm commented 1 year ago

You should be able to use the iconv tool to convert.

iconv -f latin1 -t utf8 myfile.dj | djot | iconv -f utf8 -t latin1

Not sure why you'd want to use latin1 these days, though.

tbdalgaard commented 1 year ago

Ok, I just like the way Pandoc handles this, therefor I thought it was wearth mentioning here, since it can fall back to another encoding if UTF-8 isn't matched.

Sendt fra min Mac Mini via Apple Mail

Den 7. jan. 2023 kl. 18.38 skrev John MacFarlane @.***>:

You should be able to use the iconv tool to convert.

iconv -f latin1 -t utf8 myfile.dj | djot | iconv -f utf8 -t latin1 Not sure why you'd want to use latin1 these days, though.

— Reply to this email directly, view it on GitHub https://github.com/jgm/djot.js/issues/25#issuecomment-1374547223, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGGLXRSULN6ILQK3JXBEUG3WRGSX5ANCNFSM6AAAAAATTNUUVI. You are receiving this because you authored the thread.