LoadRunner input script has garbled solution method

Source: Internet
Author: User
Tags character set html header lowercase
1. Recorded script garbled
The LR recorded script may have garbled characters, mainly when there is Chinese in the URL.
You can resolve this issue by following these questions:
A) Go to Vugen Tools, recording Options, advanced
b) Check the option, reads "Support Charset" and select "UTF-8"

2, return to garbled
There is a kind of garbled problem is: IE access page everything is normal, but the LR playback when the page displayed in the Run Viewer is garbled.
This problem is typically caused by inconsistencies in the encoding format of the page when it is saved and the CharSet format in the page (usually in the HTML header). If you encounter such problems, simply save the page as a, and unify the saved encoding format with the charset format in the page.
The cause of the problem is:
IE browser decoding will give priority to the file save encoding format, and then consider the page charset format, (normally the two are consistent), and the run Viewer is directly using the page in the charset format opened.
For example: charset=gb2312, but the file save encoding format is Utf-8,ie access will be UTF-8 decoding, and the run Viewer is decoded in GB2312 format, GB2312 solution UTF-8 nature is garbled.
Garbled reasons and solutions may not be comprehensive, please add.
In the final analysis, the function of the run viewer is simple.
Garbled characters in the Run viewer do not affect the test results.

3. No snapshots
Now for a snapshot of LR, the LR script is played back and the snapshot in the playback profile is red X, see attachment.
This problem should be caused by the LR Chinese patch, to go to a higher friend, please do not hit the Chinese patch.
Oh, LR support for Chinese is still not ideal ah.

Finally, the information about the character set is posted for your reference.

Character Set, character encoding
1. The file is divided into text files and binaries, but essentially the same, all of them are 01.
2. The computer storage device stores 0 or 1, called a bits (bit) of the computer.
3. Binary files of 0 and 1 have specialized applications to read, so they do not have any confusion about the problem, as long as the program recognized on the line. (like Doc,xls,exe,dll, etc.)
4. text files are different.,notepad to know it,vs.net to know it, UE also want to know it ... So they're going to have a standard. This standard principle is actually very simple, is to give all the characters to it a sequence number, and then according to the number to find the character on it. This is the code table, also known as the character set (CharSet).
5. text files are stored in characters, such as:a,?, @,x. It is obvious that a bit cannot represent that the computer's storage unit – byte (byte) is a number of bytes (1 byte=8 bits), so it is natural to use byte to represent the character.
6. The first encoding table –ascii code is quickly generated, very simple, is to use a byte to represent a character (highest position 0), a total of 128 (2^8) characters can be stored. If a with 65, the existence of the computer is 01000001 (65), for the convenience of writing, we generally remember as 0x41 (16), 97 means lowercase A, the computer is 01100001 (97), recorded as 0x61.? 63, denoted as 0x3f.
7. English-speaking countries with uppercase and lowercase letters added up to 52 characters, plus numbers, symbols and some special characters, is enough to use. So ASCII was very popular at first (who called the computer not invented by China ...)
8. With the popularization of computers, when non-English-speaking countries began to use the,ASCII has been clearly unable to meet (not always use Xiao Sheng to express "niche" bar), so these countries (regions) began to develop their own standards.
9. The Chinese mainland has developed a simplified Chinese character set (GB2312). Unlike English-speaking countries, our characters are far more than 128, so a byte must not be finished, then add a byte, 16 (65536) can always be. However, this solves the problem of insufficient number of digits, but what about the original English file? It's not going to take it all out and change it to double-byte. Fortunately, actually found that the original ASCII first bit incredibly is 0, then we change the 1th bit to 1 is OK? Hereafter anyone who sees 0 begins reading 1 bytes,1 The beginning of the 2 bytes of schooling. (and 128*128 that all the simplified characters are enough)
10. Therefore, in the GB2312 standard, the "small" sequence number is 0xd0a1, expressed as 11010000 10100001, and A is still expressed as 01000001, which is why the simplified operating system read ASCII file will not garbled, and vice versa is not the reason.
11. At present, the situation is still relatively good, the Chinese mainland computer operation is normal.
12. See the Chinese mainland has set a standard, other countries and regions are not outdone, have flashed their own character set, so what BIG5 (China Taiwan), Shift_JIS (Japan), ks_c_5601-1987 (South Korea) are shining debut, a Time birds, blossom.
13. Each country wants to be compatible with ASCII, for granted, the characters are completely different, so the same 0xd0a1, in the GB2312 is the "small" word, but in BIG5 is the "kohlrabi" word. If you think about it, it's not a mess.
14. At this time, people will always think that it is not possible to continue this way, so they think, if there is a standard, can include all the characters that is OK?
15. So the "mobile" standard came out, this is Unicode, in order to be enough to represent all the characters in the world such a glorious and great task, this guy used four bytes to indicate (2 of 32 times in the end is how much, I do not bother to forget), this good, peace, no longer trouble, The quiet of the ears ... (Stop, you boy so wordy)
15. But Unicode is good, but after all, four bytes means a character "wasted" too big (my broken cat on the Internet easy, telecommunications black, said the 2m, will give me 200K ...), and everyone "surprised" to find that actually some of the world's "strong big" The country's characters just focus on the first 65,536, hehe, the result Unicode is also divided into unicode-16 and unicode-32, natural, the former only with two bytes (so can only represent the top 65,536, European and Asian countries most of the word nonalphanumeric OK, what, you that @ $Y $% character No, oh, no matter what I do, find the standard Association, are the guys get it ...)
16. Although the standard came out, but at least ASCII also used so long, those English-speaking countries are also shouting, this good, what broke the standard, we did not get any benefits, but let our original program can not run (why Ah, you think, the original our program characters are a byte of a byte to recognize , now well, all changed to 2 together to recognize, how to run it?), and we have to use so many 0, white reason (Unicode in the first 128 or ASCII standard, only in front of the 8 0), because those countries "power" is relatively large, so this problem can not be ignored
17. The world's cattle are always so many, the problem is easy to be solved by a trifle.
18. Think about how GB2312 solves the problem of ASCII compatibility (1 begins with reading 2 bytes,0 beginning with 1 bytes), likewise,utf read 1 bytes (ASCII code),110 beginning read 2 bytes,1110 The beginning of read 3 bytes, This is the great UTF-8 (and of course the UTF-16, the same principle,xx read 4 bytes at the beginning of the read 5 bytes,xx read 6 bytes at the beginning of the first reading)
19. Of course UTF-8 not GB2312 so simple, after reading can not directly check the Code table, add a step, follow the template to extract the word Fu Geacha OK
Here is the template for UTF-8
The 0x0000-0x007f uses a byte to represent the 0xxxxxxx
0X0080-0X07FF two bytes for 110xxxxx 10xxxxxx
0x0800-0xffff three bytes for 1110xxxx 10xxxxxx 10xxxxxx
Let me give you an example,
If you encounter 11100110 10110001 10001001 01000001 such a byte stream, first you see the first bytes start with 1110, that is, read 3 bytes and extract by template to get 0110 110001 001001 (remove template flag, then four bytes four bytes read 0 x6c49), check the Unicode encoding table is the word "Han", and the last one to start with 0 must be a byte,0x0041, that is, "a".
20. Well, the above is the principle, and then to talk about the simple traditional operating system conversion garbled problem it?
21. According to my idea,windows operating system should have a default system character set, such as the simplified operating system should be GB code, traditional operating system is BIG5, the English operating system is ASCII. This character set is used by default for software (Notepad) in the system.
22. So my traditional operating system is stored in the default text file is BIG5, when the file into the simplified system, its Notepad program uses its own default encoding (GB) to read, so it's messy.
23. So if you use Utf-8 to save, you should not have a problem when switching between the two systems.
24. To solve this problem is also very simple, as long as the original code to know the text file can be used, read it out, and then turn into Unicode.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.