From owner-freebsd-current@freebsd.org Sat Nov 21 00:45:40 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 C3646A2EA58 for ; Sat, 21 Nov 2015 00:45:40 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) (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 42FEC1805 for ; Sat, 21 Nov 2015 00:45:40 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by lbblt2 with SMTP id lt2so71064556lbb.3 for ; Fri, 20 Nov 2015 16:45:32 -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; bh=rk97DBrRyVKlFfC7Ux1GHq7ifDkr0O8+pK+MiJjAMe8=; b=hwyaLJPpGXi4yT26hGjHpBhYi/2b6lI0EM5WiSF39QUYrmVmAf2XmiWCTITB5n9715 zA0TLv+mpOYhcnSF41gqf1/VAfX3XDlBrgPWMjV9BmibPHKoDOSXWcVlkhY4Zudt13lx usTDRT9mL9iiT5nkAKJo4NpQegTErA0tGPO0MhJPdwoD2Ya7PbyGVqDrj7z35Y9ltvNn 73IBF34Zbr55CXSfIEGUmr0qfohgs9i3rKIvGpLLJppqPGv9FCyi2625ZBXwm4bf4hdq rYZYCi+DhlYp1Vi8mmqefoyzkF8Q/IKj4IHr6VR7aDuWQBmL2SkJZj43rBNCMGdKngpE oFOw== X-Gm-Message-State: ALoCoQnmz4szdgZ3NYauRsXqY2wy5awr4trQpOz8E2edUoZK6NvBrUaI3LECCTi53y58uhiPLKfS X-Received: by 10.112.218.42 with SMTP id pd10mr6792910lbc.114.1448066732019; Fri, 20 Nov 2015 16:45:32 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id a190sm241393lfa.32.2015.11.20.16.45.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Nov 2015 16:45:31 -0800 (PST) Subject: Re: /bin/ls formatting broken for non-C(?) locales To: Baptiste Daroussin , Jilles Tjoelker 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: "Sergey V. Dyatko" , freebsd-current@freebsd.org From: Andrey Chernov Message-ID: <564FBEA9.7070100@freebsd.org> Date: Sat, 21 Nov 2015 03:45:29 +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: <20151121003541.GF21071@ivaldir.etoilebsd.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HLEcicowW6IpmU1691fBLNoGGDVGawjHs" 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 00:45:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HLEcicowW6IpmU1691fBLNoGGDVGawjHs Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 21.11.2015 3:35, Baptiste Daroussin wrote: > Here is what I do propose (sorry for the ugly pad_to_col name, if one h= as better > please share :D >=20 > https://reviews.freebsd.org/D4239 The whole function is ugly, not only its name. Please no hardcoded constants assuming some internal encoding knowledge, they are wrong for non-UTF-8 encodings in any case, use wide chars instead. BTW, the same 3 chars restriction is in tar, cpio, pax, lots of ftp clients, i.e. where 'ls' emulated. --=20 http://ache.vniz.net/ --HLEcicowW6IpmU1691fBLNoGGDVGawjHs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWT76qAAoJEKUckv0MjfbKy0kH/1o5ZA4XwStZo5VY/U6BiEYo 1afEKSF+IdJTv9lG8tKjPN9YwlIt0cLLVT48UeIAIeYIYV4hwEgTLJ3JNb3RiZmz hxyG3wPrAtEN2AsCGCOGq6DqX4tWphpL42/N97u15cZyRgPUUifg7iKyFV8Dhwnv ZLIYq8X0SCGEm4pNHgQQXegRqs971WdwyQSOLbrmW2WsubAYGBc1bIckAopNJvQK CVOEBSpScidblTBNFTEYG+3iXV5QWR7dcJ/Pp4lTAhbPkaMIasahl7uZ26+bhuHL pYxAV4ijkR6Qdwd8fgv3DJmZ7d6Lu1Kcxy4W84Em5+XPju1BgQ84Pnj+tQkSMq4= =eCbV -----END PGP SIGNATURE----- --HLEcicowW6IpmU1691fBLNoGGDVGawjHs--