For a fpdf+ Chinese Unicode solution, please refer to this articlehttp://twpug.net/modules/newbb/viewtopic.php?topic_id=1570forum=14post_id=6400~~~~~~~~~~~~~~~~~~~~~~~~ (intercepted below)You can take a reference to this web pagehttp://www.fpdf.org/phorum/read.php?f=1i=5142t=5142 (latter part)
There are three necessary kits1 Fpdf http://www.fpdf.org2 Chinese Http://www.fpdf.org/download/chinese.zip3 Chinese-unico
Original address :http://www.joelonsoftware.com/articles/Unicode.htmlAuthor: Joel Spolsky: Http://local.joelonsoftware.com/wiki/Talk:Chinese_ (Simplified)
The things that every programmer absolutely must know about character sets and Unicode (don't make excuses!) )
Unicode and Character Set
Have you ever felt the "Content-type" tag in HTML is full of mystery? Although you know that this thing must appear
vs2013 Compile VC + + source code, error:
Error msb8031:building an MFC project for a non-unicode character set is deprecated. You must the change of the project property to the Unicode or download an additional library. See http://go.microsoft.com/fwlink/p/?LinkId=286820 for more information.
Solution:
Download the installation package Vc_mbcsmfc.exe from Microsoft Official website, then install it and
When MFC projects use Unicode, cstdiofile.readstring reads that the data is Unicode encoded and must be converted or garbled
Convert byte data to Unicode encoding
int Chartounicode (char *pchin, CString *pstrout){int Nlen;WCHAR *ptch;
if (Pchin = = NULL){return 0;}
Nlen = MultiByteToWideChar (CP_ACP, 0, Pchin,-1, NULL, 0);//CP_ACP is the local machine native prop
character. Therefore, it can be expressed at most theoretically.
256x256 = 65536 characters.
The issue of Chinese encoding needs to be discussed in a specific article. This note does not cover this issue. It is pointed out that although all characters represent one symbol in multiple bytes
Unicode is irrelevant to the UTF-8.
3. Unicode
As mentioned in the previous section, there are multiple encoding meth
1.1. Question ProblemYou need to deal with data, doesn ' t fit in the ASCII character set. You need to handle data that is not suitable for the ASCII character set. 1.2. Resolve SolutionUnicode strings can be encoded in plain strings in a variety of ways, according to whichever encoding you choose: Unicode strings can be encoded in a number of ways as normal strings, according to the encoding you choose (encoding): 1 #将
What is the relationship between utf8 and unicode encoding? What is the difference? UTF8 = Unicode Transformation Format -- 8 bit
It is a Unicode transfer format. Converts a Unicode file to a BYTE Transfer Stream.
UTF8 Stream Conversion Program:
Input: unsigned integer c-the code point of the character to be encoded (
Conversion between "Unicode Character Set" and "Multi-Byte !~
Functions are:See the msdnMS-help: // Ms. msdnqtr. v80.chs/ms. msdn. v80/ms. win32com. v10.en/Intl/unicode_2bj9.htmInt widechartomultibyte (UintCodePage,// Code pageDWORDDwflags,// Performance and mapping flagsLpcwstrLpwidecharstr,// Wide-character stringIntCchwidechar,// Number of chars in string.LpstrLpmultibytestr,// Buffer for New StringIntCbmultibyte,// Size of BufferLpcstrLpd
String encoding judgment; Unicode, between UTF-8 Encoding
The difference between Unicode and UTF-8 encoding Unicode is a character set, while UTF-8 is one of Unicode, Unicode is always dubyte, while UTF-8 is variable, for Chinese characters,
PHP achieves Unicode and Utf-8 mutual conversion
I. coding principles and implementation
Unicode encoding is the basis for UTF-8 and gb series encoding (gb2312, gbk, and gb18030) Conversion. although we can also directly create a UTF-8-to-these encoding table, but few people will do this, because the variable encoding of UTF-8 is uncertain, so the general use of unico
1. Windows defines Unicode Data TypesWchar (UNICODE character)Pwstr (pointer to Unicode string)Pcwstr (pointer to a constant Unicode string)The above are Unicode characters and strings. At the same time, Windows defines the ANSI/Unicode
This article briefly introduces the development history of Unicode and JavaScript. For more information, see
1. What is Unicode?
Unicode comes from a very simple idea: to include all the characters in the world in a set, as long as the computer supports this character set, it can display all the characters and there will be no garbled characters.
It starts from
This article mainly introduces how the JavaScript language supports the Unicode Character Set. For more information, see what I will share with you next month, and the support of the JavaScript language. The following is the lecture for this sharing.
1. What is Unicode?
Unicode comes from a very simple idea: to include all the characters in the world in a set
Unicode programming using C ++
The support for wide characters is actually part of the ansi c standard, used to support multi-byte expression of a character.
The width character is not exactly the same as the Unicode character. Unicode is only a type of width character encoding.
1. Definition of wide characters
In ANSI, the length of a character (char) i
Brief introduction
Today's applications are often designed for international use. These applications may need to handle strings in different languages. Unicode is a language-independent character representation standard.
Because the Java programming language already uses Unicode internally to represent characters, the development of internationalized applications is much easier. However, you cannot consid
industrious and simple Chinese people have developed the GBK (GB2312 extension) encoding, which is an ASCII-compliant indefinite length (length of 1-2) encoding, for the basic 128 characters are still in one byte, but "Xiang" in Chinese is expressed in two bytes:Similar to GBK, UTF-8 is also an indefinite-length encoding that is compatible with ASCII codes, which vary in length and can therefore represent almost all world text. For specific details, refer to Wiki: http://zh.wikipedia.org/wiki/U
When we spend most of our time applying existing applications
Program Port to Microsoft Windows CE. Generally, this plan is not too difficult. We started with Microsoft Win32
Code Of course, Windows CE is based on Win32 application interfaces (APIS. It is advantageous that our application (Raima Data Manager) has easy-to-use interfaces and contains a library consisting of approximately 150 sub-functions written in C, it can be used to create, manage, and access databases.
By setting up an appl
Keywords: javascript Chinese character conversion to Unicode unicode encoding conversion to Chinese Character
Conversion of JavaScript Chinese Character unicode encodingCode.
Javascript Library -Javascript
VaR Gb2312unicodeconverter = {
Tounicode:
Function (STR ){
Return Escape (STR). tolocalelowercase (). Replace (/% u/GI,
'\ U' );
}
, Togb2312:
Functi
If you're a programmer who lives in the 2003, you don't know the basics of character, character set, encoding, and Unicode. Then you must be careful, if I catch you, I will let you peel six months of onions in the submarine to punish you.
This vicious threat was first made by Joel Spolsky ten years ago. Unfortunately, many people think he's just joking, so there are still a lot of people who don't fully understand
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.