Commit 774a97f8 authored by Martin v. Löwis's avatar Martin v. Löwis

Use de_DE in example, change message for unknown locale. Fixes #797447.

Will backport to 2.3.
parent 3e54714b
......@@ -398,7 +398,7 @@ Example:
\begin{verbatim}
>>> import locale
>>> loc = locale.setlocale(locale.LC_ALL) # get current locale
>>> locale.setlocale(locale.LC_ALL, 'de') # use German locale
>>> locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform
>>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut
>>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale
>>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale
......
/***********************************************************
Copyright (C) 1997, 2002 Martin von Loewis
Copyright (C) 1997, 2002, 2003 Martin von Loewis
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
......@@ -177,7 +177,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
result = setlocale(category, locale);
if (!result) {
/* operation failed, no setting was changed */
PyErr_SetString(Error, "locale setting not supported");
PyErr_SetString(Error, "unsupported locale setting");
return NULL;
}
result_object = PyString_FromString(result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment