Previous ArticleArticleMedium, the wide character set to print Chinese characters, also need to set locale
There are not many locale. H files, and the source code of the header file is attached.
View code
/* * ** Locale.
Warning: setlocale: LC_CTYPE: cannot change locale, setlocalelc_ctypeSetlocale warning
I have been using iterm2 on mac for some time. The following warning is always reported when I log on to the server:Warning: setlocale: LC_CTYPE: cannot change
File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_controls.py", line 6523, in __init__ _controls_.DatePickerCtrl_swiginit(self,_controls_.new_DatePickerCtrl(*args, **kwargs))wx._core.PyAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL)
Setlocale
Configure the region information.
Syntax: char * setlocale (INT category, const char * locale );
Return Value: String
Function types: operating system and environment
Description
This function is used to configure the region information
During the past two days, I have encountered the wide character problem:
Question 1: Why do we need to call setlocale (lc_all, "CHS") before using wsprintf to output Unicode-encoded strings "); for strings output by printf with multi-byte encoding,
This article focuses on & ldquo; installing Chinese Language Pack & rdquo; & ldquo; UbuntuServer Chinese Questions & rdquo;, & ldquo; changing the language environment of Ubuntu & rdquo;, & ldquo; ubuntulocale setting & rdquo;, & ldquo;
Description of the setlocale function in the VBS document:
Sets the global locale and returns the previous locale.
A locale is a collection of user reference information, which is related to the user's language, country/region and cultural
In the multi-byte character-wide conversion function provided by the C Runtime Library: mbstowcs ()/wcstombs (), the global variable locale (locale encoding) must be used ), to specify the encoding type of multi-byte characters
1. functions:
Used to
Published in: http://www.hellocpp.net/Articles/Article/722.aspx
In fact, for me, this articleArticleI have encountered some problems. Today is just a whim. Let's take a closer look.
Bug Description: create a user name with a Chinese/Japanese
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.