From owner-freebsd-standards@FreeBSD.ORG Sun Apr 7 19:12:59 2013 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 152A491A; Sun, 7 Apr 2013 19:12:59 +0000 (UTC) (envelope-from cedric.blancher@gmail.com) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) by mx1.freebsd.org (Postfix) with ESMTP id D811AAD8; Sun, 7 Apr 2013 19:12:58 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id 17so6035613iea.26 for ; Sun, 07 Apr 2013 12:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=rjfbGtvoYwaJdEDHzDy0t2A8GueIK7clV/XT6dnYpKI=; b=tmSPxJm5MLK+RzhGBoF2ZS6CCwEIfBy48XngFtzbldDGLGY/RYhZWzzogCuRwnqmAk 0XuQAv1wtkDisiVhk6gaVRG37gjhrW46hmorOsnKNxNmlyluYD317L6WOhZ8vC+C+hbJ HvzKNOYLjFmEjnJVJTXyxEQrJANTabaWYTi0ufkt5LL3DCTybw+SSqCuaIyFytgy15Iy SnYZ/YVSfWn0NccSAVle73o6epFIytcic61TTR1MOb2NrjpxOvffnwcA+73C6YIg+X/o X7ZvnaLKYE5bYdJK6NruzKb5H3xVVLor7q53cyvuyeXG7bDgjwqA8azsU8IXgFLWXx/7 O3hg== MIME-Version: 1.0 X-Received: by 10.50.153.81 with SMTP id ve17mr4934010igb.24.1365361977954; Sun, 07 Apr 2013 12:12:57 -0700 (PDT) Sender: cedric.blancher@gmail.com Received: by 10.50.40.36 with HTTP; Sun, 7 Apr 2013 12:12:57 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Apr 2013 21:12:57 +0200 X-Google-Sender-Auth: HnVli7FsgViY2Y6OnjPE8jF2ewY Message-ID: Subject: Fwd: Where does FreeBSD tr -C differ from tr -c? From: Cedric Blancher To: freebsd-hackers@freebsd.org, freebsd-standards@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 19:12:59 -0000 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 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 Institute Pasteur -- Cedric Blancher Institute Pasteur