I am British - and I did have issues with this too, but as I don't use different currencies I get around it by not using the £ sign at all. No too much help...
Karen On Sat, Mar 28, 2009 at 7:22 PM, Mark Carter <[email protected]> wrote: > > Hi, > > I'm wondering if there's much of a British contingent here on ledger. > Anyone owning up? > > I have been playing with the latest build of ledger. I have been > encountering UTF-8 issues :( I think I'm right in saying that £ > (poundsign) is ascii code Dec 163 - a single byte - but in UTF-8 > encoding it requires 2 bytes. The errors I've sometimes been getting > is: > Error: Invalid UTF-8 > Looking at the hex dump, ledger works when the £ is represented by 2 > bytes, but fails when it represent by 1 byte. This is fairly tedious, > because different editors seem to have different ideas about how to > represent it. Not only is it creating display issues, but it also > raises questions about what ledger thinks the unit really is, with > implications on how things like commodity prices are treated. > > It helps to have the following line in one's ledger file: > ; -*- coding: utf-8 -*- > ... assuming you then edit it with emacs. Perhaps the safest thing to > do would be to write things in a unitless way,though, or maybe fake > the units as $ . > > Much joy. > > Regards, > Mark. >
