?????????????????????????LoadRunner?????????????????????????????????????????????????????????
????????????????????
???????????????????????г????????????????????????????????????

?1 LR???????????


?????????????????????????????Virtual User Gen?? Tools->Recoding Options -> Advanced -> Support charset -> UTF-8?????????????????????????????
??????????????????????
??????????????????????????????????????????????????????????????????????????????????????????ò?????????vuser_init??vuser_end?У?????????????????Action?С????????????????????????????????????????????????GBK?????????????UTF-8????????????????????????loadrunner??????????lr_convert_string_encoding??
????int lr_convert_string_encoding ( const char *sourceString?? const char *fromEncoding?? const char *toEncoding?? const char *paramName);
?????ú?????4???????????????£?
????sourceString?????????????????
????fromEncoding???????????????
????toEncoding??????????????????
????paramName??????????????????
??????????
????lr_convert_string_encoding("??????"??LR_ENC_SYSTEM_LOCALE?? LR_ENC_UTF8?? "Account");
????web_submit_data("login.quick"??
????……
????"Name=account"?? "Value={Account}"?? ENDITEM??
????……
????LAST);
????????????????????????lr_convert_string_encoding?????????????????????????β????x00????C??????X00??????????????????????????x00???????????????????
???????????

 

char tmp[100];
lr_convert_string_encoding("??????"??LR_ENC_SYSTEM_LOCALE?? LR_ENC_UTF8?? "Account");
strcpy(tmp??lr_eval_string("{Account}"));
lr_save_string(tmp??"Account");
web_submit_data("login.quick"??
……
"Name=account"?? "Value={Account}"?? ENDITEM??
……
LAST);

???????strcpy??lr_save_string?????????x00???????????????