importing Bills - character encoding

John Ralls jralls at ceridwen.us
Tue Dec 29 11:46:33 EST 2015


> On Dec 29, 2015, at 8:34 AM, Mike Evans <mikee at saxicola.co.uk> wrote:
> 
> But, yes we should be testing the string encoding, or locale first.
> 
> I'm going to revert and think some more.

Mike,

It's possible to test a string for UTF-8 because it has a limited range of first bytes for multi-character code points (i.e. anything that isn't ASCII). Unfortunately that's not true of anything else so we're pretty much stuck with querying the locale as we do now or asking the user. BOMs are optional and so can't be used as a definitive test, though having one is a sure indication that the document is Unicode.

Regards,
John Ralls




More information about the gnucash-user mailing list