➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 ronaldoussoren
收信人 Dmitry.Jemerov, loewis, ned.deily, r.david.murray, ronaldoussoren, vstinner
日期 2014-03-23.09:04:14
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1395565454.71.0.82462631152.issue18378@psf.upfronthosting.co.za>
In-reply-to
内容
With the following C code:

#include <locale.h>
#include <stdio.h>

int main(void)
{
	char* res = setlocale(LC_CTYPE, "UTF-8");
	printf("Result: %s\n", res);

	res = setlocale(LC_CTYPE, "UTF-9");
	printf("Result: %s\n", res);
	return 0;
}
/* EOF */

I get the following output:

Result: UTF-8
Result: (null)

That is, UTF-8 is a valid locale for LC_CTYPE, and as expected some other string isn't.

BTW. "UTF-8" is only a valid locale for LC_CTYPE, not for other categories (when you change LC_CTYPE to LC_ALL both calls return NULL).
历史
日期 用户 动作 参数
2014-03-23 09:04:14ronaldoussoren修改recipients: + ronaldoussoren, loewis, vstinner, ned.deily, r.david.murray, Dmitry.Jemerov
2014-03-23 09:04:14ronaldoussoren修改messageid: <1395565454.71.0.82462631152.issue18378@psf.upfronthosting.co.za>
2014-03-23 09:04:14ronaldoussoren链接issue18378 messages
2014-03-23 09:04:14ronaldoussoren创建