[Top][All Lists]

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

Re: GNU grep,awk,sed: support \u and \U for unicode

From: Assaf Gordon
Subject: Re: GNU grep,awk,sed: support \u and \U for unicode
Date: Wed, 11 Jan 2017 01:03:03 -0500

> On Jan 10, 2017, at 19:59, Assaf Gordon <address@hidden> wrote:
> I'd like to suggest (or discuss) a minor addition to grep/awk/sed:
> adding support for '\u' and '\U' for unicode characters, 

To get the ball rolling...

Attached two patches (for sed,awk) which implement very crude
proof-of-concept support for \u,\U sequences.
Currently only unicode->UTF8 is supported.

usage examples:
    $ ./gawk 'BEGIN {print "hello\u03a8"}'                                      

    $ echo hellox | ./sed/sed 'y/x/\u03a8/'                                     

comments very welcomed,
 - assaf

Attachment: 0001-sed-add-support-for-unicode-escapes-u-U.patch
Description: Binary data

Attachment: 0001-awk-add-suppoer-for-unicode-escapes-u-and-U.patch
Description: Binary data

reply via email to

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