On Thu, 22 Jul 2021, Sven Schreiber wrote:

> with a July 7th snapshot I experienced messed-up results from working
> with hansl string functions, where the textual input comes from a text
> file with non-ASCII stuff (German Umlaute), and the file used the
> Windows codepage.

There was a little bug in readfile that prevented recoding from
working as intended, now fixed in git.

However, if you know how a text file is encoded, and it's not UTF-8,
you can use the second argument to readfile, as in

string s = readfile("umlauts.txt", "cp1250")

For good measure I've added a recode() function in git (just exposes
GLib functionality). So you can now do, e.g.,

string s = recode(s, "cp1250", "utf8")

Allin
_______________________________________________
Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it
To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/

Reply via email to