When using LoadRunner to parameterize, for some information, such as address, person name, and so on, many times need to pass in Chinese, but sometimes encounter the character encoding does not cause the script error.
The following describes the methods that can be used in two LoadRunner to convert the encoding to UTF-8.
Action () {//The first of these methods Chartmpparam[ +]; Lr_convert_string_encoding ((Lr_eval_string ("{List}"), Lr_enc_system_locale, Lr_enc_utf8, "Str" ); strcpy (Tmpparam,lr_eval_string ("{str}")); Lr_log_message ("Str is%s", Tmpparam); Lr_save_string (Tmpparam,"receivercity");
//The second method of Char*tmpparam = lr_eval_string ("{List}"); Lr_convert_string_encoding (Tmpparam, NULL,"Utf-8", "Tmpparam"); Lr_save_string (Tmpparam,"receivercity"); Lr_output_message (Lr_eval_string ("{Tmpparam}"));}
LoadRunner converting a parameter file to UTF-8 encoding