Mysql database garbled saving Vietnamese garbled solution bitsCN.com
I tested it myself. many characters are changed '? '.
The utf8 character set is used for database connection:
Define ("MYSQL_ENCODE", "UTF8 ");
Mysql_query ('set names'. MYSQL_ENCODE, $ conn) or die ('character SET setting error'. mysql_error ());
It took more than half an hour.
The data in the insert statement is still garbled. I suddenly wondered if the field cannot store the
Vietnamese wifeeven if they want to marry, they will not run the poor group like Chinese singles.Of course, China is said to be richer than Vietnam, and Vietnamese women still have a lot to marry to China because of poverty. Indeed, women's marriage to wealthy regions is a universal phenomenon, and China has also experienced foreign marriages with Taiwan, Japan, South Korea and Europe. 1999 years, a Chines
At the needs of Vietnamese customers yesterday, add a map for them and use the map provided by the Vietnamese themselves.VietbandoMap:
API: http://vietbando.vn/api/examplesE.aspx
When the project is introduced, a parameter error is always reported. After an afternoon, I was puzzled. I had no way to exclude them one by one. After that, I changed
Hey !!!! Really despise them.
TIPS:
Writing interfaces must
A third-grade mathematics question in a Vietnamese primary school
After seeing this news, I felt a little speechless. This question is not so exaggerated. It is also simple to write programs. I hope that the news reported by the media will be like a news report, I hope to report more valuable news about science and technology and the economy. Let's just talk about the code.
#include
From the output, we can see that there are a total of 230389 soluti
Windows 7 64-bit Simplified Chinese Professional Edition and C + + Builder 2010 Integrated Development Environment Source code:---------------------------------------------------------------------------#pragma hdrstop#include 650) this.width=650; "title=" capture. JPG "alt=" wkiol1vqukdyb8wsaabah-zhyda789.jpg "src=" http://s3.51cto.com/wyfs02/M00/6D/B9/ Wkiol1vqukdyb8wsaabah-zhyda789.jpg "/>The program runs some of the results such as:650) this.width=650; "Title=" The last group of solutions to
I test myself, many characters become '? '。
The database connection is already using the UTF8 character set:
Copy Code code as follows:
Define ("Mysql_encode", "UTF8");
mysql_query (' SET NAMES '. Mysql_encode, $conn) or Die (' character set error '. Mysql_error ());
For half an hour, I didn't get it.
Insert the data are still garbled, suddenly think, is not the field can not save these Vietnamese text.
I look at the da
[Unicode] character encoding table information, unicode character encoding
The UTF-8 is somewhat similar to the Haffman encoding, which encodes Unicode:
0x00-0x7F characters, expressed in a single byte;
The character 0x80-0x7FF is expressed in two bytes;
0x800-0xFFFF characters are represented in 3 bytes;
① The unicode
English system that is ASCII encoding, the Chinese system is GB2312 or Big5 encoded), the remaining three are "Unicode" (corresponding to UTF-16 LE), "Unicode big Endian" (corresponding to UTF-16 be), and "UTF-8".
At present, the work of auxiliary plane mainly concentrates on the second and third plane's Unified Ideograph , so it includes GBK,GB18030,Big5 and other Simplified Chinese , the various
Research on gb18030 encoding and Unicode ing between GBK, gb18030 and Unicode
Gb18030 has two versions: GB18030-2000 and GB18030-2005. In this article, the version gb18030 without specifying is the GB18030-2005. This article discusses the following issues:
Gb2312 has 682 graphical symbols, all of which are placed in area 1. There are 717 graphical symbols in area 1 of GBK and 166 graphical symbols in Area
turn from: one leaf floating boat http://blog.csdn.net/jdsjlzx/article/details/7058823 PackageLia.meetlucene;Importjava.io.IOException;Importorg.apache.lucene.index.CorruptIndexException; Public classUnicode { Public Static voidMain (string[] args)throwscorruptindexexception, IOException {String s= "Introduction"; String TT= Gbencoding (s);//String tt1 = "Hello, I want to tell you a thing";System.out.println ("Unicodebytes is:" +TT); //Output "Introduction" of
expressed using multiple bytes to express a symbol. For example, the common encoding method in Simplified Chinese is GB2312, which uses two bytes to represent a Chinese character, so it is theoretically possible to represent a maximum of 256x256=65536 symbols.The issue of Chinese coding needs to be discussed in this article, which is not covered by this note. It is only pointed out that although a symbol is represented in multiple bytes, the Chinese character coding of the GB class is irrelevan
Copy Code code as follows:
'//convert Chinese to Unicode
function urlencoding (Vstrin)
Dim i
Dim strreturn,thischr,innercode,hight8,low8
Strreturn = ""
For i = 1 to Len (Vstrin)
THISCHR = Mid (vstrin,i,1)
If Abs (ASC (THISCHR)) Strreturn = Strreturn THISCHR
Else
Innercode = ASC (THISCHR)
If Innercode Innercode = Innercode + h10000
End If
Hight8 = (Innercode and hff00) \ hff
Low8 = Innercode and hff
Strreturn = strreturn "%" H
Option Explicit Private Declare Function multibytetowidechar Lib "Kernel32.dll" (ByVal CodePage as Long, ByVal DwFlags as Long, ByVal lpmultibytestr as String, ByVal cchmultibyte as Long, ByVal lpwidecharstr as String, ByVal Cchwidechar as Long As Long Private Declare Function widechartomultibyte Lib "Kernel32.dll" (ByVal CodePage as Long, ByVal dwFlags as Long, ByVal Lpwidecharstr as Long, ByVal Cchwidechar as Long, ByRef lpmultibytestr as any, ByVal cchmultibyte as Long, ByVal LpD Efaultchar a
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#将Unicode转换成普通的Python字符串: "Encoding (en
Character Set charset: defines the number of characters contained in a set, that is, the characters that belong to the character set and do not belong to the set, such as ASCII, GBK, Unicode. Almost all other character sets contain the ASCII character set.
Encoding: defines how to store characters in bytes, such as: ASCII (also represents encoding), GBK (also represents encoding), Unicode (also represents e
PHP character encoding conversion class,
support for ANSI, Unicode, Unicode big endian, UTF-8, Utf-8+bom to convert each other.
Four common text file encoding methods
ANSI Code:
No file header (file encoding at the beginning of the symbolic byte)
ANSI encoded alphanumeric account of one byte, Chinese characters accounted for two bytes
Carriage return line break, single byte, hexadecimal representation 0d
Let's first explain why we need to convert Chinese to unicode encoding. Unicode plays an important role in general international standards. It is more byte-saving than traditional character encoding, enabling the design of web pages to be displayed on platforms of different languages, therefore, as long as the Chinese character is converted to Unicode, no garbled
ASCII (sbcs): It is a byte encoded string of all English characters and contains several control characters.
MBCS: countries modify and expand ASCII based on their own needs, and use several bytes to indicate local characters. There is no unified standard.
UNICODE: logically, all character encodings in the world are unified, that is, all characters in the world are uniquely encoded and not specific implementations are involved (there is no rule on h
Java uses the UTF-8 format string, where Java communicates with C + + to convert UTF-8 strings to Unicode strings, such as "ABCDABCD Chinese people xiasha 123." After converting to Unicode, the appearance is as follows:\u41\u42\u43\u44\u61\u62\u63\u64\u4e2d\u56fd\u4eba\u6c11\u4e0b\u6c99\u31\u32\u33\u2e\u676d\u5ddeVC in the following processing can be turned backCString cxxclass::unicodetostring () {CString
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.