You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gawk in cygwin on Windows is reporting odd lengths and matches of strings when multi-byte characters are involved. Someone on StackOverflow asked about a couple of issues they saw that, so far at least, no-one there can explain and seem to just be bugs. I posted a bug report to the GNU awk bugs mailing list, https://lists.gnu.org/archive/html/bug-gawk/2024-07/msg00000.html, the feedback there is that it's a cygwin or MSYS2 port issue, could you please take a look? I also emailed cygwin at cygwin dot com per the advice from the GNU bug list.
Description / Steps to reproduce the issue
gawk in cygwin on Windows is reporting odd lengths and matches of strings when multi-byte characters are involved. Someone on StackOverflow asked about a couple of issues they saw that, so far at least, no-one there can explain and seem to just be bugs. I posted a bug report to the GNU awk bugs mailing list, https://lists.gnu.org/archive/html/bug-gawk/2024-07/msg00000.html, the feedback there is that it's a cygwin or MSYS2 port issue, could you please take a look? I also emailed cygwin at cygwin dot com per the advice from the GNU bug list.
Expected behavior
If we output 4 multi-byte characters as 10 bytes using:
and run the following gawk command on it we get the output shown:
i.e. 6 instead of 4. If we run
it shows that what is intended to be single a 4-byte character is being treated as 2 characters, one 3 bytes and the other 1 byte.
If we create some input using:
and then run this on it we get the expected output shown::
but if we add the
IGNORECASE
flag we get a blank line output:unless we also remove the end of string delimiter,
$
, from the end of the regexp:Actual behavior
See above.
Verification
Windows Version
CYGWIN_NT-10.0-22631
MINGW environments affected
Are you willing to submit a PR?
no
The text was updated successfully, but these errors were encountered: