1. 程式人生 > >loadrunner請求中有中文無法識別

loadrunner請求中有中文無法識別

原本請求: “Name=Custom[BugType]”, “Value=程式碼錯誤”, ENDITEM, “Name=Custom[HowFound]”, “Value=功能測試”, ENDITEM, 轉為可以識別中文的程式碼:

lr_convert_string_encoding(lr_eval_string("程式碼錯誤"),LR_ENC_SYSTEM_LOCALE,LR_ENC_UTF8,"BugType");

lr_save_string(lr_eval_string("{BugType}"),"BugType");

lr_convert_string_encoding(lr_eval_string("功能測試"),LR_ENC_SYSTEM_LOCALE,LR_ENC_UTF8,"HowFound");

lr_save_string(lr_eval_string("{HowFound}"),"HowFound");


"Name=Custom[BugType]", "Value={BugType}", ENDITEM,
"Name=Custom[HowFound]", "Value={HowFound}", ENDITEM,