[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"}'
helloΨ
$ echo hellox | ./sed/sed 'y/x/\u03a8/'
helloΨ
comments very welcomed,
- assaf
0001-sed-add-support-for-unicode-escapes-u-U.patch
Description: Binary data
0001-awk-add-suppoer-for-unicode-escapes-u-and-U.patch
Description: Binary data
- GNU grep,awk,sed: support \u and \U for unicode, Assaf Gordon, 2017/01/10
- Re: GNU grep,awk,sed: support \u and \U for unicode,
Assaf Gordon <=
- Re: [Grep-devel] GNU grep,awk,sed: support \u and \U for unicode, Paul Eggert, 2017/01/11
- Re: [bug-gawk] GNU grep,awk,sed: support \u and \U for unicode, arnold, 2017/01/11
- Re: [bug-gawk] GNU grep,awk,sed: support \u and \U for unicode, Norihiro Tanaka, 2017/01/19