From owner-freebsd-current@freebsd.org Sat Nov 21 20:57:59 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 B9DCFA34AB1 for ; Sat, 21 Nov 2015 20:57:59 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) (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 5ED7B1B3D for ; Sat, 21 Nov 2015 20:57:59 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by lbbkw15 with SMTP id kw15so78589954lbb.0 for ; Sat, 21 Nov 2015 12:57:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=M3hadn13ySyTW19sMXOmDibk2bCGgioo16M7zF2ecmY=; b=KIh6vEtGaAlt2yqwc7TyYcYvkJu+YoGAaj06+heY+/5al+i8FKmx2Bg+srgAJ5k8oq UNs7kJbWbWx2J9Zqd2EXHd7zoYYGZpBu3uSopghEj8DP6u3KD3d0zc+we8QQqzPKg0cy akLKaBfEbdtI4ReUAnzL2Q9OVf9cAYuygY++h4G45OCB+8rupVLZF8w1MwJwe3YZsP8B 8AbsNCRE572wg5FhSBqgaITtVYTOHJupgBnQ/888kNahkA0beWjc/frP0WmLceHrK0IE zuVFLEcxoz4NAdb5YYSeMJuCn9iiujtGkLRNRbDu0+McXfa+E/rY8+tBoJgr5qYbE7SF EMSw== X-Gm-Message-State: ALoCoQkaed2Pt9NHJDBG9x6uakACnDeFjw+XEDu8cXiuePjMhdHRO+HBvZS2jPGOoaviTBs7T8SX X-Received: by 10.112.99.4 with SMTP id em4mr8005226lbb.87.1448139471214; Sat, 21 Nov 2015 12:57:51 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id l128sm789373lfe.27.2015.11.21.12.57.49 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 Nov 2015 12:57:50 -0800 (PST) Subject: Re: /bin/ls formatting broken for non-C(?) locales To: Ed Schouten , Baptiste Daroussin 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> Cc: Jilles Tjoelker , "Sergey V. Dyatko" , FreeBSD Current From: Andrey Chernov Message-ID: <5650DACA.2090501@freebsd.org> Date: Sat, 21 Nov 2015 23:57:46 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 20:57:59 -0000 On 21.11.2015 15:18, Ed Schouten wrote: > 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. > I agree. Checking error return of wide chars functions with some fallback will be good too. -- http://ache.vniz.net/