On Sat, Sep 13, 2025 at 20:12:42 +1000, Duncan Roe via Bug reports for the GNU Bourne Again SHell wrote: > On Fri, Sep 12, 2025 at 11:23:17PM -0400, Lawrence Velázquez wrote: > > On Fri, Sep 12, 2025, at 10:56 PM, Duncan Roe via Bug reports for the GNU > > Bourne Again SHell wrote: > > > Bash is not recognising U+00A0 as whitespace. What to do about it, if > > > anything? > > > > I believe bash mostly tokenizes on <blank> characters. Is U+00A0 > > considered a <blank> in your locale?
I'm not sure that's true. > It certainly *renders* as a space. > Other than that, I'm not sure I understand your question. hobbit:~$ unset -v a; a=(' ' $'\t' $'\r' $'\n' $'\u00A0') hobbit:~$ for c in "${a[@]}"; do if [[ $c = [[:blank:]] ]]; then printf '%s is blank\n' "${c@Q}"; fi; done ' ' is blank $'\t' is blank hobbit:~$ cat /etc/debian_version 13.1 hobbit:~$ locale LANG=en_US.utf8 LANGUAGE= LC_CTYPE="en_US.utf8" LC_NUMERIC="en_US.utf8" LC_TIME=C LC_COLLATE="en_US.utf8" LC_MONETARY="en_US.utf8" LC_MESSAGES="en_US.utf8" LC_PAPER="en_US.utf8" LC_NAME="en_US.utf8" LC_ADDRESS="en_US.utf8" LC_TELEPHONE="en_US.utf8" LC_MEASUREMENT="en_US.utf8" LC_IDENTIFICATION="en_US.utf8" LC_ALL= In my locale, only space and tab are considered :blank: out of the set space, tab, carriage return, newline, non-breaking space. However, even if NBSP were considered a :blank:, I'm not sure the bash parser would care. (In fact, I'd consider it a bug if it did.)