-8 encoding is used.
The code is as follows: print iconv ('utf-8', 'gb2312', js_unescape ($ _ REQUEST ['p _ sort ']);
At this point, we have successfully reversed the js escape code.
As follows:
In addition, I found a function that uses PHP to implement js escape encoding:
The code is as follows:
Function phpescape ($ str){$ Sublen = strlen ($ str );$ RetrunString = "";For ($ I = 0; $ I {If (ord ($ str [$ I]) >= 127){$ TmpString = bin2hex (iconv ("gb2312", "
is MBCS. Also, in the default locale of the simplified Chinese windows, refer to GBK.
1.3. Unicode
Later, someone began to think that too much coding caused the world to become too complex, so that the brain hurts, so we sit together and shoot the head to come up with a method: All language characters are expressed in the same character set, which is Unicode.
The original Unicode standard UCS-2 uses two bytes to represent one character, so you can of
, we need to transcode it.
#### Transcoded TestUse the iconv tool that comes with Linux for transcoding. This tool is very powerful and supports multiple encodings, as shown below:
[ora10g@killdb dul]$ iconv -l|grep GBCN-GB//CSGB2312//CSISO58GB1988//EBCDIC-CP-GB//GB//GB2312//GB13000//GB18030//GBK//GB_1988-80//GB_198880//ISO646-GB//[ora10g@killdb dul]$ iconv -l|grep UCS10646-1:1993/UCS4/CSUCS4//ISO-10646/UCS2/ISO-10646/UCS4/UCS-2//
as follows: print iconv ('utf-8', 'gb2312', js_unescape ($ _ REQUEST ['P _ sort ']);
At this point, we have successfully reversed the js escape code.
As follows:
In addition, I found a function that uses PHP to implement js escape encoding:
The Code is as follows:
Function phpescape ($ str){$ Sublen = strlen ($ str );$ RetrunString = "";For ($ I = 0; $ I {If (ord ($ str [$ I]) >= 127){$ TmpString = bin2hex (iconv ("gb2312", "ucs-2", substr ($ str, $
($ _ REQUEST ['p _ sort ']);
At this point, we have successfully reversed the js escape code.
As follows:
In addition, I found a function that uses PHP to implement js escape encoding:
The code is as follows:
Function phpescape ($ str){$ Sublen = strlen ($ str );$ RetrunString = "";For ($ I = 0; $ I {If (ord ($ str [$ I]) >= 127){$ TmpString = bin2hex (iconv ("gb2312", "UCS-2", substr ($ str, $ I, 2 )));// $ TmpString = substr ($ tmpString,). subst
languages (such as Chinese and Japanese), nor scientific symbols, nor ancient texts (mysterious symbols and hieroglyphics) and music symbols. Changing the length of a byte can enable the encoding of a larger character set, which seems effective but completely impractical. All computers are based on eight bytes. The solution is a character encoding scheme (character encoding scheme, ces), which can represent a number larger than 256 with a fixed length or extended multi-byte sequence. these valu
encoding method that is strictly required and is more prone to decoding failures when the file is not encoded, put the loose encoding method at the end. For example, latin1 is a very loose encoding method. The text obtained by any encoding method is decoded using latin1 and will not fail to be decoded.-Of course, the decoded results are naturally "garbled ". Therefore, if you put latin1 at the top of fileencodings, opening any Chinese file is garbled.
The following is a fileencodings setting
more and more new systems are supporting and using Unicode. How to exchange data between these new systems and old systems is actually the first challenge. So a new term is born again, that is, UTF, Unicode translation format, that is, converting Unicode to a certain format. Why convert to a certain format? The conversion is for transmission and exchange. A good UTF-x solution should facilitate the transmission of texts of different languages and codes between different computers over the netwo
language characters are expressed in the same character set, which is Unicode.The original Unicode standard UCS-2 uses two bytes to represent one character, so you can often hear the assertion that Unicode uses two bytes to represent a character. But soon some people think 256*256 too little, or not enough, so there is a UCS-4 standard, it uses 4 bytes to represent a character, but we use the most is still
all proceeds into the bag and assigns page numbers, GBK is the No. 936 page, CP936. Therefore, you can also use CP936 to represent GBK. MBCS (Multi-Byte Character Set) is a generic term for these encodings. So far everyone has used double-byte, so it is sometimes called DBCS (Double-byte Character Set). It is important to be clear that MBCS is not a specific encoding, and that in Windows, depending on the region you set, MBCS refers to different encodings, and it is not possible to use MBCS as
UCS-2 uses two bytes to represent one character, so you can often hear the assertion that Unicode uses two bytes to represent a character. But soon some people think 256*256 too little, or not enough, so there is a UCS-4 standard, it uses 4 bytes to represent a character, but we use the most is still UCS-2. The UCS (U
I believe you must have met, open a Web page, but show a heap of like garbled, such as "бїяазъся", "????????"? Remember the message header fields Accept-charset, accept-encoding, Accept-language, content-encoding, content-language in HTTP? And that's what we're going to discuss next.
Directory:
1. Basic knowledge
2. Common character set and character encoding
2.1. ASCII character set encoding 2.2. Gbxxxx Character Set encoding 2.3. BIG5 Character Set encoding
3. The g
>
Unicode is commonly used in the UCS-2, it uses two bytes to encode a character, such as the Chinese character "warp" encoding is 0X7ECF, 0X7ECF converted to decimal is 32463,ucs-2 with two bytes to encode characters, 2 16 is equal to 65536, so ucs- 2 can encode a maximum of 65,536 characters. Encoding from 0 to 127 characters like ASCII-encoded characters, suc
I would like to start a series of blogs posts sharing PowerShell scripts to speed up our solution operations. Today, I am going to share a script file, can select a network adapter, changes its DNS address, and then join the server To the domain you specify. Background =============== In my environment, I has Windows hosts. I need to configure them from the OS installation to configure fail over cluster and then create and run VMs on them. Without scripting, manually complete related tasks woul
The author faces the following problems:I have a Cisco C240 server, which has 10 of the same size SAS local disk, a piece of SSD. One of the two SAS disks consists of a RAID 1 virtual drive. The other nine SAS disks are made into separate virtual drives. So here's the problem, we're going to install ESXi on Virtual drive on RAID 1. What's the choice?In the installation interface of ESXi, you can see that the size of the disk is 837.26 GiB. cannot be d
Due to the working relationship, JNI must be used to call methods and transmit data between C ++ and Java programs. However, JNI used to work in an English environment and is encoded in Chinese (similar to other languages) I am not paying much attention to the problem. I recently took some time to study it and sorted out my experiences as follows for your discussion or reference.Before further discussion, we need to explain the following basic knowledge:
Inside Java, all string encodings use U
file and converts it from the 8th to the gb2312th file, and the output is directed to the bbb.txt file.
OverviewIconv is a library that uses Unicode as the intermediate code to convert various internal codes. It basically covers all the coding methods in the world, for example, ASCII, gb2312, GBK, gb18030, big5, UTF-8, UCS-2, UCS-2BE, UCS-2LE,
Unicode is currently widely used in UCS-2, it uses two bytes to encode a character, for example, the Chinese character "by" encoding is 0x7ecf, 0x7ecf to convert to decimal is 32463, the UCS-2 uses two bytes to encode characters. The power of 2 is equal to 65536, so the UCS-2 can encode up to 65536 characters. The characters encoded from 0 to 127 are the same as
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.