encoding and Endian
Unicode, Code Point is the value of evry character in Unicode table(int,long,ll)
Unicode defines a codespace of 1,114,112 code points in the range 0hex to 10FFFFhex.
plane0(0000-FFFF), which is called Basic Multilingual Plane, contains most characters ,including Chinese
Code points in plane0 can be accessed as a single code unit in UTF-16, one to three bytes in UTF-8;
others are supplementary plane, accessed as surrogate pairs of UTF-16, four bytes in UTF-8
UTF-8, an 8-bit variable-width encoding which maximizes compatibility with ASCII;
UTF-16, a 16-bit, variable-width encoding;
UTF-32, a 32-bit, fixed-width encoding
stored in computer and endian:
characters can be encoded and then store the results in computer
a character with code point of 666, large than 0Xff, we usually use 1 bytes * 2 or 2 bytes * 1 to store the encoded value
we can read the value in C by:
char [] = "CharA" or wchar_t = 'CharA'
for a C executable, its memspace is like:
Mem---------MAX:0xfffffff--------------
kernel mem space------------
stack------------------bottom
|-----------
|-----------
|--------------top NULL------------------------
|
| Heap------------------------
Data------------------------
Code------------------------
Mem---------MIN0x00000000--------------- for example, an value is 0x123456,
Big-Endian: stack---------bottom little-Endian: stack---------bottom
|0x56 |0x12
|0x34 |0x34
|0x12 |0x56
|-----top |----top
int b =1;int *a = &b, char * p = (char*)a; if((p[] == 0x1) Big-Endian
Big-Endian, store the most significant byte in the smallest address
encoding and Endian的更多相关文章
- 基于五阶段流水线的RISC-V CPU模拟器实现
RISC-V是源自Berkeley的开源体系结构和指令集标准.这个模拟器实现的是RISC-V Specification 2.2中所规定RV64I指令集,基于标准的五阶段流水线,并且实现了分支预测模块 ...
- C# 字符编码类Encoding
在网络通信中,很多情况下都是将字符信息转成字节序列进行传输.将字符序列转为字节序列的过程称为编码.当这些字节传送到接收方,接收方需要逆向将字节序列转为字符序列.这个过程就是解码. 常见编码有ASCII ...
- unicode,ansi,utf-8,unicode big endian编码的区别
知乎--http://www.zhihu.com/question/23374078 http://wenku.baidu.com/view/cb9fe505cc17552707220865.html ...
- 关于Unicode和URL encoding入门的一切以及注意事项
本文同时也发表在我另一篇独立博客 <关于Unicode和URL encoding入门的一切以及注意事项>(管理员请注意!这两个都是我自己的原创博客!不要踢出首页!不是转载!已经误会三次了! ...
- C#中Encoding.Unicode与Encoding.UTF8的区别
今天在园子首页看到一篇博文-简单聊下Unicode和UTF-8,从中知道了UTF-8是Unicode的一种实现方式: Unicode只是给这世界上每个字符规定了一个统一的二进制编号,并没有规定程序该如 ...
- 字符集与字符编码 (charset & encoding)
乱码是个大坑,相信每个人都遇过,而且是个绕不过去的坑.我理解每个程序员都应该写一篇编码相关的博文,梳理自己对这一块的理解,下面是我反复理解多次之后的学习小结. 1.从记事本的不同编码说起: 打开记事本 ...
- 字符编码笔记:ASCII、Unicode、UTF-8、UTF-16、UCS、BOM、Endian
转载:http://witmax.cn/character-encoding-notes.html 今天中午,我突然想搞清楚Unicode和UTF-8之间的关系,于是就开始在网上查资料. 结果,这个问 ...
- 字符编码终极笔记:ASCII、Unicode、UTF-8、UTF-16、UCS、BOM、Endian
1.字符编码.内码,顺带介绍汉字编码 字符必须编码后才能被计算机处理.计算机使用的缺省编码方式就是计算机的内码.早期的计算机使用7位的ASCII编码,为了处理汉字,程序员设计了用于简体中文的GB231 ...
- .NETFramework:Encoding
ylbtech-.NETFramework:Encoding 1.返回顶部 1. #region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, Pub ...
随机推荐
- Shell编程(二)Bash中调用Python
- 自学python 6.
内容:id() is == 编码 解码1.好声音选秀比赛评委在打分的时候可以进行输入. 假设有10个评委.让10个评委进行打分, 要求, 分数必须大于5分, 小于10分.count = 1while ...
- 【由浅入深理解java集合】(三)——集合 List
第一篇文章中介绍了List集合的一些通用知识.本篇文章将集中介绍List集合相比Collection接口增加的一些重要功能以及List集合的两个重要子类ArrayList及LinkedList. 一. ...
- JS定义函数
一.定义函数的方法 (1)函数声明 (2)函数表达式 二.函数声明方法定义函数 function functionName(arg0, arg1, arg2) { // 函数体 } (1)FireFo ...
- Matconvnet环境配置一些坑
1.先安装VS再安装matlab否则安装失败 2.cuda7.5支持MATLABR2016a/b,支持VS2013但是不支持VS2015 3.cuda8.0支持MABTLABR2017a,对应编译需V ...
- 非关系型数据库mongodb的语法模式
from pymongo import MongoClient #连接 conn = MongoClient() #进入数据库 db = conn.edianzu #连接mydb数据库,没有则自动创建 ...
- python 06
1.集合 增: s.add(8) print(s) s.update('alex') # 迭代添加 print(s) 删 s = {1,2,3,'22','ss',(3,4)} s1 = s.pop( ...
- python基础类知识~pymysql封装类
一简介:咱们来介绍下 DBA常用的几个类 二 具体代码 #!/usr/bin/python3import pymysqlimport sysclass DBHelper: def __init__(s ...
- Social Grouping for Multi-Target Tracking and Head Pose Estimation in Video(翻译)
0 - ABSTRACT 许多计算机任务在缺少上下文信息的情况下的处理会更加困难.例如,在多相机跟踪任务下,行人可能在不同照相机下面因为有这不同的姿势和灯光条件而看起来很不一样.类似地,在低分辨率高角 ...
- 集合-LinkedList
List linkedlist = new LinkedList<>(); LinkedList 底层数据结构是链表. 1. LinkedList 除了实现了List接口外,还实现了双向链 ...