2014年10月29日 星期三

Mbstring and PHP Should Use in Net Software Improvement


Bytes and Bits are two models for storing logical info. A bit is may be thought as one gap, which might be crammed with considered one of two values: zero or 1.


A byte is a grouping of eight bits. When it comes to math, a byte is able to representing 256 totally different values (28).


Let’s take into consideration a language, say English. It has some characters (a, b, c, … and so on.) that are represented in a pc by bytes. The entire variety of characters in English shouldn’t be greater than 256, so each character may be represented through the use of a special eight-bit sequence.


Strings are merely a set of characters. Usually in PHP string operations function on strings of single-byte character. For instance: you could need to examine the strings “Hey” and “Hello”. With strcmpr(), the 2 strings can be in contrast assuming every each character within the string takes one byte.


However take into consideration a language which has greater than 256 characters (for instance Japanese), or once we need to symbolize characters from a number of languages on the similar time. One byte storage for every character isn’t sufficient. That is the place the multi-byte idea is available in.


A string of Japanese textual content might trigger the strcmpr() perform to return a improper or rubbish worth because the assumption that one byte represents one character not holds true. Once we work with multibyte-encoded strings, the manipulation of those strings wants particular features relatively than the widespread single-byte string features. To cope with multi byte strings in PHP, mbstring supplies the multi byte particular string features.


Understanding UTF-eight


UTF stands for Unicode Transformation Format and is an encoding system that goals to symbolize each character in each language in a single character set. There are totally different variations of UTF, a few of that are proven under:











Encoding FormatDescription
UTF- 1Suitable with ISO-2022, out of date from the Unicode …read more

The post Mbstring and PHP Should Use in Net Software Improvement appeared first on DICKLEUNG DESIGN 2014.



沒有留言: