On Fri, 23 Jul 2021, Sven Schreiber wrote:
Am 23.07.2021 um 10:59 schrieb Riccardo (Jack) Lucchetti:
> On Thu, 22 Jul 2021, Sven Schreiber wrote:
>
>>> 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")
>
> May I object to the function name? In the context of a statistical
> package, the name recode() seems to point at a _numerical_ recoding
> function, like what we do with replace(). I'd be happier with something
> like textrecode(), if not too long.
I also had some spontaneous doubts. Maybe this would be a candidate for
a secret function? As soon as I knew about the "wrong" encoding I simply
used a text editor to save with utf8. Not sure that gretl has to offer
this feature.
OK, I was too hasty in adding recode(). I've now removed it in git.
On reflection, I think it's sufficient that we have the second,
codeset argument to readfile().
Allin