In computing, a locale is a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface.
Usually a locale identifier consists of at least a language identifier and a region identifier.
on windows, use codepage instead of locale;
(narrowly speaking, locale decides the format how to show symbols like dollar and date, related to region;language enable and decide the way fonts are shown)

winodows use UTF-16 as the internal encoding for string literals, Unix-like system use UTF-8;
we can enforce windows to encode/decode strings with UTF-8;
before input a char, we should first choose an input language, so that keys can be convert to the char we want;
if bytes array of string A (encoded in UTF-16) is \x33\x44\x55, if we pass UTF-8 version bytes array of same string "\x33\x44\x56\x55", a win function can't find sting A;
language pack contains fonts to be used.
copy an string is copying a list of fonts?
u"charssss" in c++ means that this array is encoded in one implementation of Unicode? like utf-8 or utf-16, and its impiler-dependent.

example:

#include<iostream>
#include<string>
#include<codecvt>
using namespace std; int main()
{
char d1[] = u8"\xE6\x8E\x96";
char d2= u8"中国银行";
char16_t d3[] = u"中国银行";
string d4 = wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t>{}.to_bytes(d3);
cout << d1 << endl;
cout << d2 << endl;
wcout << d3 << endl;
cout <<d4 << endl;
}

最新文章

  1. python3安装lxml(windows)
  2. hdoj 4323
  3. PHP校验ISBN码的函数
  4. Windows C盘格式化或者同平台迁移oracle数据库
  5. HtmlAgilityPack --解析Html源码
  6. TNetHttpClient支持异步访问(Delphi 10.1 Berlin,红鱼儿的博客)
  7. Actor模型[转]
  8. 13. leetcode 453. Minimum Moves to Equal Array Elements
  9. MySQL 6.0安装图解
  10. [LeetCode]Count and Say 计数和发言
  11. .net 发布程序时出现“类型ASP.global_asax同时存在于...”错误的解决办法
  12. 海外aws-ubuntu-16.04系统使用ansible安装tidb
  13. MySQL简单查询语句练习
  14. 【Java基础】14、位运算之——按位与(&amp;)操作——(快速取模算法)
  15. HDU 6124 17多校7 Euler theorem(简单思维题)
  16. Map接口的使用
  17. Can&#39;t locate Data/Dumper.pm in perl5的处理
  18. 【codeforces 623E】 Transforming Sequence
  19. GP开发示例:数据库去重
  20. Mac OS Yosemite 文件批量重命名

热门文章

  1. Golang入门教程(九)复合数据类型使用案例二
  2. 转载 IEnumerable和IEnumerator 详解
  3. webservice 项目中遇到的问题
  4. 网易PM599产品笔试题
  5. 使用 JS 实现图片左右跑马灯
  6. 设置 img 在 div 中水平居中和垂直居中
  7. List、Map、set的加载因子,默认初始容量和扩容增量
  8. 【核心】project(idea文件)、module(iml文件)到SSM集成、热部署、Tomcat启动、MAVEN依赖冲突
  9. mybatis-configxml样板
  10. vue找错