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).
On Sat, Dec 21, 2024 at 11:15 PM Vivien Kraus <viv...@planete-kraus.eu> wrote: > Le samedi 21 décembre 2024 à 21:36 +0900, Nala Ginrut a écrit : > > If you want to base on Hoot, maybe it's OK to implement your own > > (current-endianess) as you showed. > > This will not run on Hoot, it only runs at expansion time. However, > from what I understand from the GNU MO file format specification, it > can be written either as big-endian or little-endian, I assume > depending on the machine used to produce the MO file. You can detect > which one it is by looking at the magic header in the file. > > Thank you for the bytevector-u32-ref suggestion! > > Vivien >