From nobody Wed Jun 10 14:50:35 2026 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gb7xR1lWfz6gYvJ for ; Wed, 10 Jun 2026 14:50:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gb7xR1BPcz3XZx for ; Wed, 10 Jun 2026 14:50:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781103035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=elFRepeEWjm5w+ZYYwP774tQCAse6/QWFqy08BphCDY=; b=Jbj7mTyTWZ8XiSP0mG0m7ql6Re6HnJNPv17X3BYmSAC3zx362dkJQw9T9G15p/fG6PWFMV H7XX051tBJ6qCKio53weY4iSdsDSxmPUa8Hfc+d91FNSBVP+6cgJ1C9zqHVdAJ33vurqC2 ehfJt9YqvcbONrzRe40/dEgepACAMLhzmHeBqEq3lOm9GMiGw7qGm6XjI3emnmblRR14Of DaGpo8KY1TXIS9Rnra8Tj5skGorqTXYWpR2YyZb81vyXEIet0YUZ8dJMQt9gRV3aAyvD1Z angVv+42kC0fFICpP2y8k0vMJWrttL4SEqJr83F5KvOFcUO7Jp7z3TukJW6xdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781103035; a=rsa-sha256; cv=none; b=tczZqmek0at9Z3rdGQWAJQVupbHcNmiy6U6pMGKgp8azyscTlFziyW9wYGVlsJUAdwyIW2 pym2Xp9QHjNPvGKArvIJKZ41wondt7ZiHbQKu3vOY+bGwokTBsr24HekKvRdUBOoNO/Gld Ep4qN3uGEvtRDBv6QPehdnM1V/K8vqu/rNSNDBexU9iSaXbztG3JUuhcAANVNXQqxcykKO GZBJ5eVa5wjOzdPuvsCiEx64U0yRdTelWp82MeuVz0yzVipd408Ev331YAHF27jasYeOHa GQbwLTdWBI2Cxil0lwmcs2cHit59xwfHSQhYDJdQZT7yxwJwyXZEoNzLa0x4qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781103035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=elFRepeEWjm5w+ZYYwP774tQCAse6/QWFqy08BphCDY=; b=aInMNfTZCEwa1fMjr6M6c8fQEggHSaXh29qSxo9cTrUbsiGejQ4XxeJtc7o/WpcSNsHels BuQjC0X7YTB2tEhGMhzC72osSPq2vejSzGsX6voQJoBYh5ZGnm/yUEfHj2NDVRl2gUZZ/8 /QgpXdg9IjwVK0ncmE69eQRk+si0p5noph1jHt6GwYJOlenh7Xc2ZgtL2QEtXe7HFmZ1DY L3hJC+mLa6fL0rYkpT6Y4sbeJri/WayvyMY5LHUneFrV1eQjoxADzOitLjEYQ+xBJvia9k oBcrMHvo1HmARu5UGPiyF6kn4bYN/ZX8cDUegwAos4GGOgUCsUJlV78zeJVX+w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4gb7xR0jHQz1P9y for ; Wed, 10 Jun 2026 14:50:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 65AEoYS5085896 for ; Wed, 10 Jun 2026 14:50:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 65AEoYTE085895 for ports-bugs@FreeBSD.org; Wed, 10 Jun 2026 14:50:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 295945] Set the ports tree locale to C.UTF-8 in Mk/bsd.port.mk and retire USE_LOCALE Date: Wed, 10 Jun 2026 14:50:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tijl@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@FreeBSD.org X-Bugzilla-Flags: exp-run? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295945 --- Comment #5 from Tijl Coosemans --- (In reply to Robert Clausecker from comment #3) It looks like the trick to install share/locale/C/LC_MESSAGES/SCHILY_utils.= mo stopped working with gettext 0.23. Gettext treats C. as untransl= ated now. But you're not using gettext for translation. You're relying on the = fact that gettext calls iconv on translation strings. So, instead of using gett= ext you could use iconv directly. However, if I were you I would remove all the gettext stuff and replace _("J=C3=B6rg Schilling") and _("Joerg Schilling")= with "J\xc3\xb6rg Schilling". Users that still use ISO8859-1 will see that as "J=C3=83=C2=B6rg Schilling", but that group is shrinking. The solution with iconv looks something like this: use iconv in main() to convert the string "J\xf6rg Schilling" from ISO8859-1 to the encoding of the current locale into some buffer, and then replace _("J=C3=B6rg Schilling") = and _("Joerg Schilling") everywhere with a pointer to that buffer. char jorgschilling[64] =3D {}; /* zero filled */ static const char jorgschilling_src[] =3D "J\xf6rg Schilling"; main() { ... setlocale(LC_ALL, ""); ... iconv_t icd =3D iconv_open("", "ISO8859-1"); char *dst =3D jorgschilling; size_t dstlen =3D sizeof(jorgschilling) - 1; char *src =3D jorgschilling_src; size_t srclen =3D sizeof(jorgschilling_src) - 1; iconv(icd, &src, &srclen, &dst, &dstlen); iconv_close(icd); ... } foo() { printf("%s\n", jorgschilling); } --=20 You are receiving this mail because: You are on the CC list for the bug.=