help-gawk
[Top][All Lists]
Advanced

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

Re: How to make gawk aware of unicode characters?


From: david kerns
Subject: Re: How to make gawk aware of unicode characters?
Date: Fri, 6 Jan 2023 08:29:35 -0700

see chapter 13  - https://www.gnu.org/software/gawk/manual/gawk.html

On Fri, Jan 6, 2023 at 7:56 AM Peng Yu <pengyu.ut@gmail.com> wrote:

> Hi,
>
> I use the following code to match no-break space.
>
> $ awk -e '/§\xc2\xa03/ { print }' <<< '§ 3'
> § 3
>
> However, the unicode is U+00A0 instead of \xc2\xa0. Obviously, gawk
> treats the input as a stream of bytes instead of Unicode characters.
> Is there a way to let gawk be aware of Unicode characters so that I
> can write something like \u00a0 as in many other languages?
>
>
> https://www.utf8-chartable.de/unicode-utf8-table.pl?names=2&utf8=string-literal&unicodeinhtml=hex
>
> --
> Regards,
> Peng
>
>


reply via email to

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