[m-users.] How to set the locale?
Volker Wysk
post at volker-wysk.de
Sun Oct 10 05:57:23 AEDT 2021
Am Samstag, dem 09.10.2021 um 20:41 +0200 schrieb Volker Wysk:
> Hi!
>
> Mercury programs appear not to set the locale at startup, using
>
> setlocale(LC_ALL, "");
>
> How should the locale be set in Mercury? Is it necessary to use the foreign
> language interface?
>
> This leads to my second question: How to quote quotation marks inside the
> body of a foreign predicate, which consists of C code?
I've found it out: A double-double quote mean a single double quote:
...
"
setlocale(LC_ALL, """");
"
...
The body of a foreign predicate is just a string.
Cheers,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20211009/cefc4610/attachment.sig>
More information about the users
mailing list