X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D912E385780C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=fsXJy2WZVv0LKbvh/N2jWecGO2pQDukWAwH+8sQ2Qko=; b=fpNCWZcoMb/x69moj2QAjL1HaL0vGXxWLZKdTSNXzKurulyIQDmK+pY7/kJbNfHDBn hu4ENksLv5ivbaGcTdLVp4nTzEkhzMZXXnjNhT9g9Inc2Zhgq0guhNhLSMsBwhpELjU+ ec1AElXjhfIfUIpwxW7+0f29tgzf9dP438qBNy8Xjqp++u2c+nPFur9ZuWY4boBLBlDC XLlpgis9PP1khcPkWSBmbS6/8BD82S8YkjISow8rYY4lfGiiExZhTajVwIzTa/AiFre7 ivr5xgObwojo0gbf/JiaYydinvrqUQG9B5JZ0tmD2QMq5GzLZDhrfehYYf3PRCMPfQaj 33Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fsXJy2WZVv0LKbvh/N2jWecGO2pQDukWAwH+8sQ2Qko=; b=YFDii/GR79f5t9IZyMzhRRegQumjcOYHS97Iz2JyYgCFk0S3eIvwPuqBJfb8eno9jx RpnIVRve9SxMGGdDv2OrqCoi0kQdL/EWtfa0dmWr7uoAjpEOS1c+bu/YZJgpEkuSDQW1 lVlqTmJCNoSqKUUgxeV7qNHLs/ox8KgvUzD4Nw0N3aP/MQx/Ye3SqUdT/U5ykPvPw9BF gZblzzeW4HYXO1n3nMtlNduV7I+DVDHX5ZzjZqcMv5ORoUPCQehhralZf8qgDFoUVN9t Lh9AtuxxuuF3MTOljAvMGvHWnXyefGe00tpIdZn4sJjJGKybrbcYhcjfs3unWPwVWEMA d7VQ== X-Gm-Message-State: AOAM532px7BI4kvR3deG0JatmYbYpuGBp4YQ9vE+sXnIkBL8DnT8tHQK 1YDELZFvxXdODwPcQqweWfghVUziDEJxVrMyLXnl9MNb+s7ATA== X-Google-Smtp-Source: ABdhPJyGWCsFTsgi4CMkrJN2vGO8t/ts5r4HU+ji0/+3NIlx9lpHEu0wxGb+4Sv94wVmlJvSkKv98RHTwuqA9gigW1A= X-Received: by 2002:a17:903:208:b0:15c:7dd0:eb64 with SMTP id r8-20020a170903020800b0015c7dd0eb64mr35272370plh.40.1651227432800; Fri, 29 Apr 2022 03:17:12 -0700 (PDT) MIME-Version: 1.0 From: Gennaro Prota Date: Fri, 29 Apr 2022 12:16:36 +0200 Message-ID: Subject: `locale -s` shows incorrect info on systems where the language is changed after the OOBE To: cygwin AT cygwin DOT com X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Hi, the locale utility currently gets the system default UI locale (-s option) via GetSystemDefaultUILanguage(). This is a problem on systems where the default UI language is changed after the Windows Out of Box Experience (OOBE), because that function will happily ignore the fact (see < https://docs.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getsystemdefaultuilanguage >). FWIW, this is not just theoretical: on my work PC, which was set to Italian during the first setup (not by me), and is now set to US English, the locale utility shows: $ locale -s it_IT -- Gennaro -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple