当前位置: 首页 > 工具软件 > code saturne > 使用案例 >

code introduction

严宏旷
2023-12-01

 

java data type

Simple Type         number of bytes                          scope/precision
float                  4 bytes 32位IEEE 754                   single precision

double             8 bytes64位IEEE  754                     double precision
byte                 1 bytes                                            -128 to 127
short               2 bytes                                             -32,768 to 32,767
int                   4 bytes                                            -2,147,483,648 to 2,147,483,647
long                8 bytes                                               -9,223,372,036,854,775,808  to 9,223,372,036, 854,775,807
char                2 bytes                                              all Unicode character set
boolean          1 bytes                                               True or false

 

什么是UTF-8?它与UNICODE是一回事吗?
  Unicode的最初目标,是用1个16位的编码来为超过65000字符提供映射。但这还不够,它不能覆盖全部历史上的文字,也不能解决传输的问题(implantation head-ache's),尤其在那些基于网络的应用中。已有的软件必须做大量的工作来程序16位的数据。
  因此,Unicode用一些基本的保留字符制定了三套编码方式。它们分别是UTF-8,UTF-16和UTF-32。正如名字所示,在UTF-8中,字符是以8位序列来编码的,用一个或几个字节来表示一个字符。这种方式的最大好处,是UTF-8保留了ASCII字符的编码做为它的一部分,例如,在UTF-8和ASCII中,“A”的编码都是0x41.
  UTF-16和UTF-32分别是Unicode的16位和32位编码方式。考虑到最初的目的,通常说的Unicode就是指UTF-16。在讨论Unicode时,搞清楚哪种编码方式非常重要。

 

general code:

 

what is utf-8? And different between utf-8 and unicode?

Unicode initial ambitions is use  a 16 bits of code for more than 65,000 character provides  mapping. But this isn't enough, it cannot cover all the words on the history, also cannot solve the problem of transmission, especially in those based on network applications. Existing software must do a lot of work to process the data of 16.

Therefore, with some basic reserves,Unicode establish three encoding set.They are Utf-8,utf-16,utf-32.As shown in the name of utf-8 and  character is eight series.Using  to one or more bytes to represent a character. This way, is the biggest advantage utf-8 retained ASCII coding as part of it, for example, in utf-8 and, "A" in the ASCII encoding is 0x41.

 

 

 类似资料:

相关阅读

相关文章

相关问答