From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vivien Kraus Newsgroups: gmane.lisp.guile.user Subject: Re: Static, pure Scheme internationalization Date: Sat, 21 Dec 2024 15:31:19 +0100 Message-ID: References: <8381a20ada723b92a0630ee395fa30ea17796465.camel@planete-kraus.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11388"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.48.4 Cc: Guile User To: Nala Ginrut Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Dec 21 15:31:55 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tP0WJ-0002nb-14 for guile-user@m.gmane-mx.org; Sat, 21 Dec 2024 15:31:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tP0Vx-0004d7-UU; Sat, 21 Dec 2024 09:31:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tP0Vt-0004cV-EE for guile-user@gnu.org; Sat, 21 Dec 2024 09:31:30 -0500 Original-Received: from planete-kraus.eu ([2a00:5881:4008:2810::309]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tP0Vq-0003pV-Sa for guile-user@gnu.org; Sat, 21 Dec 2024 09:31:28 -0500 Original-Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 5b6848c3; Sat, 21 Dec 2024 14:31:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; s= albinoniB; bh=QDMg4UNSDKxXcKzXeol3qXwXIyQ=; b=YTi7WE0rAkHNLNSdUk KnpwlZodslT4nEYifrGUIFc0cfkkzVYRTrEqQ0tXKNAuXZaKJd4jhpMVe3zVprZo pRKcQyOzcj0QqOKgOUqbTAHe9cf7Gc5IXN1ezbqphOThGiLG4uwHTAJOUbqNl8bm FBcAPjkyE7nfs0ANChFgwA+zKFRsUYHnNr7DBih2dfYa3gcT16p53DAKDi8fapsV trcH4IRFaqMzQn3Apy3P67sIjao7eWnizD8xfY7viLjUf/Zr68e16CxU5PNvtFL3 6omSDkk3lK4Leougpj8nCfHw6McZxXxa6bJP3RV2oP+GWlQQitOF3FAqZ0O+8DiG saew== Original-Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 7849cde3 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sat, 21 Dec 2024 14:31:20 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=2a00:5881:4008:2810::309; envelope-from=vivien@planete-kraus.eu; helo=planete-kraus.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:20029 Archived-At: Le samedi 21 d=C3=A9cembre 2024 =C3=A0 23:18 +0900, Nala Ginrut a =C3=A9cri= t=C2=A0: > If you're going to run it like any normal Guile program, it's better > to use the "native-endianess" function of Guile to=C2=A0detect the > endianness of the current platform, IIRC it's in (rnrs).=C2=A0 The MO file specification is not very clear: https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html The only place it talks about endianness is this: =E2=80=9CThe magic number will always signal GNU MO files. The number is st= ored in the byte order used when the MO file was generated, so the magic number really is two numbers: 0x950412de and 0xde120495.=E2=80=9D I could be wrong, but my interpretation is that I should trust the magic number to indicate which byte order to use for every 4-byte number in the file. This is a bit of a stretch, admittedly, but I think it=E2=80=99s more robust that way. Vivien