Date: Sun, 7 Apr 2013 21:12:57 +0200 From: Cedric Blancher <cedric.blancher@googlemail.com> To: freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org Subject: Fwd: Where does FreeBSD tr -C differ from tr -c? Message-ID: <CALXu0UcmPAKCphiS-5LXv8y6G4JpAsi%2BekadoMUMrq-rXu44GQ@mail.gmail.com> In-Reply-To: <CALXu0Ue5uX05md777qJP8rHKZR1f1L-%2B0CR3Osjo1rRET8shrg@mail.gmail.com> References: <CALXu0Ue5uX05md777qJP8rHKZR1f1L-%2B0CR3Osjo1rRET8shrg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Forwarding to freebsd-hackers@/freebsd-standards@freebsd.org
The question remain open and I need help. tr -C is implemented by
FreeBSD tr -C but I can't find examples (or a testcase) where tr -c
and tr -C differ.
Ced
PS: Who wrote tr -C and how can I contact the author?
---------- Forwarded message ----------
From: Cedric Blancher <cedric.blancher@googlemail.com>
Date: 5 April 2013 16:04
Subject: Where does FreeBSD tr -C differ from tr -c?
To: freebsd-i18n@freebsd.org
Has anyone discovered examples for FreeBSD tr -c producing different
output than tr -C?
I tried this (ksh93) test script but it NEVER produces a difference in
the en_US.utf8 and fr_FR.utf-8 locales:
------ snip ------
builtin rm
typeset string
typeset -li16 n_ch ;
for (( n_ch=1 ; n_ch < 0x5000 ; n_ch++ )) ; do
ch="$(printf "\u[${n_ch/~(El)16#/}]")"
string+="$ch"
done
typeset -li16 m1 m2
for (( m1=0x32 ; m1 < 0x3000 ; m1+=7 )) ; do
(( m2=m1+1500 ))
range="$(printf "\u[${m1/~(El)16#/}]-\u[${m2/~(El)16#/}]")"
tr -Cd "$range" <<<"$string" >'res_C' &
tr -cd "$range" <<<"$string" >'res_c' &
wait
res_c="$( <'res_c' )"
res_C="$( <'res_C' )"
rm 'res_c' 'res_C'
if [[ "$res_c" != "$res_C" ]] ; then
printf 'DIFFER range=%q\n' "${range}"
fi
done
exit 0
------ snip ------
So when does tr -C differ from tr -c? I need examples, please...
Ced
--
Cedric Blancher <cedric.blancher@googlemail.com>
Institute Pasteur
--
Cedric Blancher <cedric.blancher@googlemail.com>
Institute Pasteur
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALXu0UcmPAKCphiS-5LXv8y6G4JpAsi%2BekadoMUMrq-rXu44GQ>
