Am 22.07.2021 um 19:56 schrieb Allin Cottrell:
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.

Thanks!

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")

Right, wasn't fully aware of that. But in my case I only got alerted to
the encoding through the unintended bug above, didn't really know it before.


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")

Ok

cheers
sven
_______________________________________________
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