Post

Replies

Boosts

Views

Activity

Comment on macOS Sonoma broke grep (assertion fails)
I don't think there's anything unusual: % locale LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL="en_US.UTF-8" Note that the problem goes away if you specify a locale that does not support multibyte characters (i.e. where MB_CUR_MAX=1): printf '%s' 'a' | LANG=C grep -o 'b*'
Oct ’23
Comment on macOS Sonoma broke grep (assertion fails)
Ah, I see — that lower-cased LANG is invalid on macOS, so the system will silently default to LANG=C. Any locale that uses a multi-byte char encoding should satisfy that conditional. So UTF-8 will do the trick, but I believe LANG=ja_JP.SHIFT_JIS would just as well (away from computer, otherwise I’d check for myself).
Replies
Boosts
Views
Activity
Oct ’23
Comment on macOS Sonoma broke grep (assertion fails)
I don't think there's anything unusual: % locale LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL="en_US.UTF-8" Note that the problem goes away if you specify a locale that does not support multibyte characters (i.e. where MB_CUR_MAX=1): printf '%s' 'a' | LANG=C grep -o 'b*'
Replies
Boosts
Views
Activity
Oct ’23
Comment on macOS Sonoma broke grep (assertion fails)
I opened these before I saw your guide (hopefully the reports are of sufficient quality): https://feedbackassistant.apple.com/feedback/13229196 https://openradar.appspot.com/radar?id=5501987135160320
Replies
Boosts
Views
Activity
Oct ’23