bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Exposing wcwidth(3) as a built-in function


From: Eli Zaretskii
Subject: Re: [bug-gawk] Exposing wcwidth(3) as a built-in function
Date: Fri, 01 Dec 2017 22:25:43 +0200

> Date: Fri, 1 Dec 2017 12:14:51 -0800
> From: Eric Pruitt <address@hidden>
> Cc: address@hidden
> 
> On Fri, Dec 01, 2017 at 09:41:14PM +0200, Eli Zaretskii wrote:
> > Thanks, but doesn't this still assume UTF-8 encoding of characters?
> > If so, it's not portable to non-UTF-8 locales, right?
> 
> That is correct. By "portable" I meant that it works on the most popular
> AWK implementations although I still need to test the script on a BSD
> box. I'm not trying to reimplement setlocale or iconv.

Calling iconv from Gawk (using loadable modules, for example, or even
as an external program) is easy enough.

> UTF-8 is easy to parse, far saner than its predecessors (IMO) and
> conveniently happens to be the only encoding other "C" that I use on
> my machines.

Then IMHO your implementation is not as useful as it could be,
especially in Gawk, which is IMO supposed to insulate the programmer
from the peculiarities of the underlying platform.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]