From owner-freebsd-current@freebsd.org Sat Nov 21 12:18:45 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28E30A3260F for ; Sat, 21 Nov 2015 12:18:45 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D61A8111E for ; Sat, 21 Nov 2015 12:18:44 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by ykfs79 with SMTP id s79so194948788ykf.1 for ; Sat, 21 Nov 2015 04:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CkgVnGctylgXQ8EKiArvzM8tCeZHUP03Ofos/6KTPEY=; b=IMgdRpAqhUmGfayqXxt8vrQEUrfweQx6e7hf4sD/VXvjflIp/HgJ2WJ+XzRflNWVpd 1IYE9dk9KQE7W3ameqRWDjd4OXK24mJzIBK8MA4ZU60vxOfKWknCIzHXSd4v+c/z/i2+ q2itvqttiny1sLteFxSwbarC5xnOhrW1P3OSNBQokASSJcbfID+UjRp8GID2ygAM3Gx2 u2sLqKICF91vMqPnt342OmOr9/awmJCN5qvtzWphtGaqW0/7o8ZHh4WkvoQwh4KxPtj2 LcR6fJ1qSUAq7bew9MiiV4HsI4NXUcLH6OFDq6EvG9VtiAJDvvF83ct1scG7M7TYuEUV NIhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=CkgVnGctylgXQ8EKiArvzM8tCeZHUP03Ofos/6KTPEY=; b=iFHPOSM7YeF3KP5yEChibSbFasDPBvh+8aMGoOlIjEw47/U4zayuhQHMygXZcSNhb/ fUFyncGLhHBlll07CUvwxW1wzHRZnR92JQpTnkCH1fmP4N23qf88JOY0yh+Grd3vpsFL roVsZWp4AzTBDfryoeNeQ8Bk/uYz3iCHQlK3HEyF3Na+QJxgEEA0gRC+XiMCvO8DwfgW vAReX1Gw9goZNfEC7AlHdV08PRyimAM0rjXVNbJNhH0SKqSLt+tDOxqIB4bIdDpO05Ws uk5MgjPqgiyxSbzQW4g+2dO6jPT7RrH2XmdGzaUeWgAKLCSBGJzhSGmV9mbHjN7cOwK6 UUsQ== X-Gm-Message-State: ALoCoQltdJDS1b9Zb4rd0tmqwEIPqXD0gVzbTFr9lYtmb9taxa0hu8T5XPq4ZrNpRpV7aNiFTOQw MIME-Version: 1.0 X-Received: by 10.129.56.7 with SMTP id f7mr18684348ywa.52.1448108323641; Sat, 21 Nov 2015 04:18:43 -0800 (PST) Received: by 10.129.91.197 with HTTP; Sat, 21 Nov 2015 04:18:43 -0800 (PST) In-Reply-To: <20151121003541.GF21071@ivaldir.etoilebsd.net> References: <20151120110556.6e20a71f@laptop.minsk.domain> <20151120104253.GA21071@ivaldir.etoilebsd.net> <20151120110212.GB21071@ivaldir.etoilebsd.net> <20151120122352.GA5751@stack.nl> <20151121003541.GF21071@ivaldir.etoilebsd.net> Date: Sat, 21 Nov 2015 13:18:43 +0100 Message-ID: Subject: Re: /bin/ls formatting broken for non-C(?) locales From: Ed Schouten To: Baptiste Daroussin Cc: Jilles Tjoelker , "Sergey V. Dyatko" , FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Nov 2015 12:18:45 -0000 Hi Baptiste, I suppose you should use the wcswidth() function somewhere to compute the visible width of the month name. Some characters may be double-width, others may have no effective width at all. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717