4 ms·
So it turns out the default on Debian is mawk which does NOT support Unicode. Thanks for pointing that out. This simple test gives different results for gawk an
by timakro 4y ago
So it turns out the default on Debian is mawk which does NOT support Unicode. Thanks for pointing that out. This simple test gives different results for gawk and mawk.
$ echo 'ö' | awk '{print length}'
- layer8 4y ago…only if the current locale is set to use UTF-8 (or some other variable-width encoding). Which nowadays the default locale usually does, but in principle it doesn’t need to be.