Date: Sun, 3 Sep 2023 07:36:59 +0100 From: Stephane Chazelas <steph...@chazelas.org> Message-ID: <20230903063659.mzyfen4evyrnz...@chazelas.org>
| though has the same limitation as my bash echo -e "$*\n\c" Yes, I know, though as nothing anywhere says what echo is supposed to do with a lone trailing \ (or in fact, a \ that is not followed by one of the defined escape sequences), I treat that as unspecified, and so anything that is produced should be acceptable - I doubt that real applications would ever do that (the way to output a \, in a version of echo that handles the escape sequences at all, is to write \\). | $ LC_ALL=zh_TW luit | $ locale title charmap | Chinese locale for Taiwan R.O.C. | BIG5 | $ echo() { printf '%b ' "$@"\\n\\c; } | $ echo 'α' | αn% That one is a different issue, and seems to me to be a simple implementation bug (and no, I am not claiming that NetBSD wouldn't act just like that) - characters ought to be fully formed before testing their values. That the encoding of some of them might happen to include a bit sequence, which in other environments, would represent a backslash, should be irrelevant. kre