Skip to content

Commit

Permalink
;doc: Document new encoding option
Browse files Browse the repository at this point in the history
  • Loading branch information
jokesper committed Feb 1, 2025
1 parent 0512800 commit 2c19779
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions hledger/hledger.m4.md
Original file line number Diff line number Diff line change
Expand Up @@ -3210,6 +3210,7 @@ The following kinds of rule can appear in the rules file, in any order.
| | |
|-------------------------------------------------|------------------------------------------------------------------------------------------------|
| [**`source`**](#source) | optionally declare which file to read data from |
| [**`encoding`**](#encoding) | optionally declare which encoding the data has |
| [**`separator`**](#separator) | declare the field separator, instead of relying on file extension |
| [**`skip`**](#skip) | skip one or more header lines at start of file |
| [**`date-format`**](#date-format) | declare how to parse CSV dates/date-times |
Expand Down Expand Up @@ -3256,6 +3257,19 @@ source Checking1*.csv

See also ["Working with CSV > Reading files specified by rule"](#reading-files-specified-by-rule).

## `encoding`

```rules
encoding ENCODING
```

Specifying `encoding` followed by a valid encoding tells HLedger how to convert a
csv to be able to make use of it.
This is most often useful when getting a csv from a bank as they are sometimes
in an old encoding.

If none is given, `utf8` is assumed.

## `separator`

You can use the `separator` rule to read other kinds of
Expand Down

0 comments on commit 2c19779

Please sign in to comment.