-Version 0.23 - July 2023
+Version 0.23 - October 2023
* Programming languages support:
- Glade: xgettext has improved support for GtkBuilder 4.
+* Runtime behaviour:
+ - In the C.UTF-8 locale, like in the C locale, the *gettext() functions
+ now return the msgid untranslated. This is relevant for GNU systems,
+ Linux with musl libc, FreeBSD, NetBSD, OpenBSD, Cygwin, and Android.
+
* msgmerge:
- The msgmerge option '--sorted-output' is now deprecated.
+Version 0.23 - October 2023
+
+* In the C.UTF-8 locale, like in the C locale, the *gettext() functions
+ now return the msgid untranslated. This is relevant for GNU systems,
+ Linux with musl libc, FreeBSD, NetBSD, OpenBSD, Cygwin, and Android.
+
Version 0.21.1 - October 2022
* On AIX, locale names with a script or with an uppercase language are now
continue;
}
- /* If the current locale value is C (or POSIX) we don't load a
- domain. Return the MSGID. */
- if (strcmp (single_locale, "C") == 0
+ /* If the current locale value is "C" or "C.<encoding>" or "POSIX",
+ we don't load a domain. Return the MSGID. */
+ if ((single_locale[0] == 'C'
+ && (single_locale[1] == '\0' || single_locale[1] == '.'))
|| strcmp (single_locale, "POSIX") == 0)
break;
2. The precise output of some programs in the "C" locale is specified
by POSIX and should not depend on environment variables like
"LANGUAGE" or system-dependent information. We allow such programs
- to use gettext(). */
- if (strcmp (locale, "C") == 0)
+ to use gettext().
+ Ignore LANGUAGE and its system-dependent analogon also if the locale is
+ set to "C.UTF-8" or, more generally, to "C.<encoding>", because that's
+ the by-design behaviour for glibc, see
+ <https://sourceware.org/glibc/wiki/Proposals/C.UTF-8>. */
+ if (locale[0] == 'C' && (locale[1] == '\0' || locale[1] == '.'))
return locale;
/* The highest priority value is the value of the 'LANGUAGE' environment
MOSTLYCLEANFILES = core *.stackdump
TESTS = gettext-1 gettext-2 \
- intl-1 intl-2 intl-3 intl-4 intl-5 intl-6 intl-7 \
+ intl-0 intl-1 intl-2 intl-3 intl-4 intl-5 intl-6 intl-7 \
intl-setlocale-1 intl-setlocale-2 \
intl-thread-1 intl-thread-2 intl-thread-3 \
intl-version \
--- /dev/null
+#! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
+
+# Test that gettext(), in the C and C.UTF-8 locales, does no translation.
+
+test -d in-0 || mkdir in-0
+test -d in-0/C || mkdir in-0/C
+test -d in-0/C/LC_MESSAGES || mkdir in-0/C/LC_MESSAGES
+
+: ${MSGFMT=msgfmt}
+${MSGFMT} -o in-0/C/LC_MESSAGES/tstprog.mo "$wabs_srcdir"/intl-1.po
+
+: ${DIFF=diff}
+cat <<EOF > in-0.ok
+cheese
+EOF
+
+../intl-1-prg in-0 C > in-0.tmp || Exit 1
+LC_ALL=C tr -d '\r' < in-0.tmp > in-0-1.out || Exit 1
+${DIFF} in-0.ok in-0-1.out || Exit 1
+
+prepare_locale_ in-0/C in-0/C.UTF-8
+../intl-1-prg in-0 C.UTF-8 > in-0.tmp || Exit 1
+LC_ALL=C tr -d '\r' < in-0.tmp > in-0-2.out || Exit 1
+${DIFF} in-0.ok in-0-2.out || Exit 1
+
+Exit 0