EUC-encoding (Japanese Windows only)

When working with non-Windows standard character sets, you may need to perform a code conversion. A character set is a mapping from a set of characters to a set of integers. This mapping forms a unique character-integer combination for a given alphabet. Extended UNIX Code (EUC) and Shift Japan Industry Standard (SJIS) are non-Windows standard character sets used to display Japanese characters on websites.

Windows uses SJIS encoding, while UNIX uses EUC encoding. When a web server is running UNIX and the client is running Windows, the characters in a website are not displayed on the client machine properly due to the difference in the encoding methods. This affects the display of EUC-encoded Japanese characters in a Vuser script.

During recording, VuGen detects the encoding of a web page through its HTTP header. If the information on the character set is not present in the HTTP header, it checks the HTML meta tag.

If you know in advance that a web page is encoded in EUC, you can instruct VuGen to use the correct encoding by using the recording options. To record a page in EUC-encoding, enable the EUC option in the Recording Options Recording node (only visible for Japanese Windows).

Enabling the EUC option forces VuGen to record a web page in EUC encoding, even when it is not EUC-encoded. Therefore, you should only enable this option when VuGen cannot detect the encoding from the HTTP header or the HTML meta tag or when you know in advance that the page is EUC-encoded.

During recording, VuGen receives an EUC-encoded string from the web server and converts it to SJIS. The SJIS string is saved in the script's Action function. However, for replay to succeed, the string has to be converted back to EUC before being sent back to the web server. Therefore, VuGen adds a web_sjis_to_euc_param function before the Action function, which converts the SJIS string back to EUC.

In the following example, the user navigates to an EUC-encoded web page and clicks a link. VuGen records the Action function and adds the web_sjis_to_euc_param function to the script before the Action function.


For more information, see Advanced URL dialog box.

Back to top