From e53f25bf1393aaf0539fe5c612ca13add516adef Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 22 Feb 2024 16:48:07 -1000 Subject: [PATCH] ;doc: add Text encoding section --- hledger/hledger.m4.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index e85d2683d..a986cbaac 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -98,6 +98,17 @@ So we usually configure a different journal file, by setting the `LEDGER_FILE` e to something like `~/finance/2023.journal`. For more about how to do that on your system, see [Common tasks > Setting LEDGER_FILE](#setting-ledger_file). +## Text encoding + +Data files containing non-ascii characters must use UTF-8 encoding. +Also, your system should be configured with a locale that can decode UTF-8 text. +On some unix systems, you may need set the `LANG` environment variable, eg. +You can read more about this in [Unicode characters](#unicode-characters), below. + +On unix systems you can check a file's encoding with the `file` command. +If you need to import from a UTF-16-encoded CSV file, say, +you can convert it to UTF-8 with the `iconv` command. + ## Data formats Usually the data file is in hledger's journal format, but it can be in any of the supported file formats, which currently are: