Contributions
Re: No mapping for the Unicode character exists in the target multi-byte code page.
The reason of the problem was the typoin the charset parameter ofthe response headercharset=utf8 should be utf-8 Was found in the response log forxmlhttp.getAllResponseHeaders() The API tried to find non-existing charset 'utf8' and failed. After fixing the response header issue on the server side ResponseText is handled without any problems.3.1KViews0likes0CommentsNo mapping for the Unicode character exists in the target multi-byte code page.
Got the following exception when loggingxmlhttp.responseText inthe function below: WinHttp.WinHttpRequest No mapping for the Unicode character exists in the target multi-byte code page. var sInput = 'payload=<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><GetUserSessionId xmlns="http://www.companyname.com/UR_ESB"><GuestMode>false</GuestMode><WorkId></WorkId></GetUserSessionId>'; function PostXml(sURL, sXmlInput) { var xmlhttp = new ActiveXObject("WinHttp.WinHttpRequest.5.1"); xmlhttp.open("POST", sURL, false, "", ""); xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(sXmlInput); Log.Message(xmlhttp.responseText) //!!! Causes exception, probably because of UTF-8 encoding } When using JMeter for testing the samesXmlInputgot no such issues. Here is the response received from JMeter: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Response xmlns="http://www.companyname.com/UR_ESB"><UserSessionId>G48ykMDalwKvwkgsMkQCnT5kYLVY9YNuDSkF+DdnWvUAqgfbbclskQxTZ7LS</UserSessionId><status>0</status><text>Operation completed without exception.</text></Response> Does anybody have any idea, how to make TestComplete receive this UTF-8 response?22KViews0likes1Comment