From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14638 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Schoepe Newsgroups: gmane.linux.lib.musl.general Subject: Re: printf doesn't respect locale Date: Tue, 10 Sep 2019 18:10:20 +0100 Message-ID: References: <20190909175452.GO9017@brightrain.aerifal.cx> <20190910163143.GI22009@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="200946"; mail-complaints-to="usenet@blaine.gmane.org" Cc: musl@lists.openwall.com To: Szabolcs Nagy Original-X-From: musl-return-14654-gllmg-musl=m.gmane.org@lists.openwall.com Tue Sep 10 19:10:49 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1i7jfD-000q8o-DP for gllmg-musl@m.gmane.org; Tue, 10 Sep 2019 19:10:47 +0200 Original-Received: (qmail 16070 invoked by uid 550); 10 Sep 2019 17:10:44 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 16051 invoked from network); 10 Sep 2019 17:10:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ASn31NPfglKTfsZnTxYMXoz4r7Hu7x+GoB/QVFSw7Zg=; b=UkN+uJHkR9io8QgkuHNNcB/qcUGHW6PLOR9hD1F9F/CUsNt1yg0MZ4IqQPZOZbcS9v cQD78Zz4mtaGJpJMeXQv1vsxo/CgF1xAyqJcumPhlPZdkbof4RyNm71WdTtqv08p4nmG BCryTsLytsS80VNlEKNUFmSTuFEASK4Hz4eIg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ASn31NPfglKTfsZnTxYMXoz4r7Hu7x+GoB/QVFSw7Zg=; b=eFBXmD3zybMLOxSSgeXL2mJ7pi6JrkgP/niLeCh2vwLzqZDeUJYIWUdk5/F/8yvbdV fY249RRSqJFZqGpz0SXODCzvnqD3vyGM2iJs35/NXdLFdik1NFd7FDJadwVDt1BFGkvO LE94fvNMAe9kGU1gMhr2np1+3UbwEsucJIVwad6Bt42p2MEywxDmN6QnYb4nbnNr1iEN VyiiQEnyV3gXTfOLSLz7U7slZ/2GMfSh5+ur+vi10OXHm0mjw2ncZGmdalijzkR6Zaja wSEJ/syQUVxIY2GG0vB+p79n7Cqk/cFA7TM0861O2yxuVEqiaLmzdoy0e9ttotGBscFJ QuLA== X-Gm-Message-State: APjAAAXLTOtP/5R8wi6SNcGvmnc6brOppZ3cYdOBQP+yV+88HMdrAUlG A2q5ORXP4ToQrxQuzlOjq5P5H/8hxqVnD0NsRPed3Q== X-Google-Smtp-Source: APXvYqzyCDwyG2g14SGVS0zFiImcGflYqv3e33B1Qx/zC48ri7EZ8sKvUzzGQYqekuKDsl8wuigKaE5CMmJy3ijb/3M= X-Received: by 2002:a37:7403:: with SMTP id p3mr28999687qkc.366.1568135431558; Tue, 10 Sep 2019 10:10:31 -0700 (PDT) In-Reply-To: <20190910163143.GI22009@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:14638 Archived-At: Basically, someone used printf to produce json output and was unaware that the radix used by printf was locale-dependent. When this was run on a system with a non-English locale, it no longer produced valid JSON as output. Best, Daniel On Tue, Sep 10, 2019 at 5:31 PM Szabolcs Nagy wrote: > > * Daniel Schoepe [2019-09-10 17:00:49 +0100]: > > I'm also not a fan of this behavior, I actually stumbled across this > > when tracking > > down a bug the different radix usage caused. > > i'm interested in how this can cause a bug in correct software.