[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf test for finding UTF-8 locale?

From: Bruno Haible
Subject: Re: autoconf test for finding UTF-8 locale?
Date: Mon, 21 Nov 2022 11:02:57 +0100

Hi Werner,

> I'm searching for an autoconf test that checks whether a 'neutral'
> locale with UTF-8 encoding is available.  Interestingly, the
> 'autoconf-archive' git repository doesn't have such a thing, which
> surprises me because many tools behave differently depending on
> one-byte or multi-byte encodings (for example, GNU `awk` or `perl`).
> According to
> https://unix.stackexchange.com/questions/597962/how-widespread-is-the-c-utf-8-locale
> I can't assume that 'C.UTF-8' is universally available; it seems that
> it is necessary to also check for 'en_US.UTF-8'.  How can this be done
> in a generic way that works on as many platforms as possible?

You can do so in a way similar to the Gnulib-provided macros
  gt_LOCALE_FR_UTF8 [1]
  gt_LOCALE_TR_UTF8 [2]
or the gettext internal macro
  gt_LOCALE_DE_UTF8 [3]

E.g. replace 'French_France'/'Turkish_Turkey'/'German_Germany' with
'English_United States'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]