[m-users.] How to set the locale?

Volker Wysk post at volker-wysk.de
Sun Oct 10 17:14:48 AEDT 2021


Am Sonntag, dem 10.10.2021 um 16:12 +1100 schrieb Julien Fischer:
> Hi,
> 
> On Sat, 9 Oct 2021, Volker Wysk wrote:
> 
> > 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?
> 
> Yes, it's necessary to use the foreign language interface; there is
> (currently) nothing in the standard library for setting the locale.
> 
> > This leads to my second question: How to quote quotation marks inside the
> > body of a foreign predicate, which consists of C code?
> 
> Foreign proc, decl and code bodies are just string literals; just use
> the usual character escapes.

Okay, Thank you!

V.W.
-------------- 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/20211010/c6620650/attachment.sig>


More information about the users mailing list