bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] [awk 3.1.3] I have a precise problem


From: Aharon Robbins
Subject: Re: [bug-gawk] [awk 3.1.3] I have a precise problem
Date: Sun, 29 Jul 2012 16:43:32 +0300
User-agent: Heirloom mailx 12.4 7/29/08

Hello. Concerning this:

> Date: Fri, 27 Jul 2012 11:50:29 +0900 (KST)
> From: ????????? <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] [awk 3.1.3] I have a precise problem
>  
> hello, I found a precise problem with awk (version 3.1.3). 
>
> $ awk --version
> GNU Awk 3.1.3
>
> $ echo "??????" | env 'LC_ALL=ko_KR.UTF-8' awk '{print length($0)}'
> 6
> --&gt; wrong...

This came through as 6 question marks. I assume it is actually a
Unicode string in Korean?

> but, at other version, it works fine.
>
> $ awk --version
> GNU Awk 3.1.5
> $ echo "??????" | env 'LC_ALL=ko_KR.UTF-8' awk '{print length($0)}'
> 2
> --&gt; right
>
> could you explain this, please?

Sure.

$ gawk-3.1.3 --copyright | sed 1q
Copyright (C) 1989, 1991-2003 Free Software Foundation.

This version is 9 years old. 9 years ago, gawk did not understand
multibyte strings.

$ gawk-3.1.5 --copyright | sed 1q
Copyright (C) 1989, 1991-2005 Free Software Foundation.

This version is a mere 7 years old. IIRC this was the version where I
added support for multibyte strings, although it took several more
releases before everything worked correctly.

In any case, both versions are woefully out of date.  The current released
version is 4.0.1, which has many new powerful features and improvements,
and you should upgrade to using it.

Thanks,

Arnold



reply via email to

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