Oh, I'm not familiar with MO file, it seems the endianess is unrelated to
the platform, you need go test it to confirm each time.
Best regards.

On Sat, Dec 21, 2024, 23:31 Vivien Kraus <viv...@planete-kraus.eu> wrote:

> Le samedi 21 décembre 2024 à 23:18 +0900, Nala Ginrut a écrit :
> > If you're going to run it like any normal Guile program, it's better
> > to use the "native-endianess" function of Guile to detect the
> > endianness of the current platform, IIRC it's in (rnrs).
>
> 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:
>
> “The magic number will always signal GNU MO files. The number is stored
> in the byte order used when the MO file was generated, so the magic
> number really is two numbers: 0x950412de and 0xde120495.”
>
> 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’s more robust that way.
>
> Vivien
>

Reply via email to