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

Re: Public service announcement about dependencies on gawk


On Tue, 19 Mar 2013 23:44:22 +0000
"brian m. carlson" <sandals@crustytoothpaste.net> wrote:

> > Well, as far as I know, mawk has some sort of terrible UTF-8
> > support, so it's a no way for many applications.

> Could you please explain?  And if you haven't filed a bug report,
> could you please do so?  Searching Google, the only UTF-8-related
> bugs I found are bugs mandated by POSIX (and one that updating mawk
> to 1.3.4 would fix).

$ echo привет | mawk '{ print length($0) }'
$ echo привет | gawk '{ print length($0) }'
$ echo привет | mawk '{ printf substr($0, 1, 1) }' | hd
00000000  d0                                                |.|

I don't think it's mandated by POSIX (or is it?). Anyway, it's obviously
not what most of the applications want.

> Also, my original post was inspired by the fact that most packages
> depending on gawk invoke "awk" as their binary.  In that case, the
> dependency is wrong and unnecessary.

I just always put #!/usr/bin/gawk -f in the beginning of the file and
declare an explicit dependency on gawk. And also, I don't support
running those scriptf on broken awk implementations.

WBR, Andrew

Attachment: signature.asc
Description: PGP signature

Reply to: