18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
SAHI and UTF-16
Hello All,
My web application generates UTF-16 web pages and it looks like this situation is not recognized by SAHI correctly. With embedded Sahi code on top contains Sahi code in UTF-8, then comes two bytes that identifies UTF-16, then comes all page data starting with <html>. Internet explorer gets confused about that and displays page as UTF-8. Is it possible to add/switch on UTF-16 support?
My web application generates UTF-16 web pages and it looks like this situation is not recognized by SAHI correctly. With embedded Sahi code on top contains Sahi code in UTF-8, then comes two bytes that identifies UTF-16, then comes all page data starting with <html>. Internet explorer gets confused about that and displays page as UTF-8. Is it possible to add/switch on UTF-16 support?
Answers
Can you please attach the URL of the webpage you are referring to?
if (responseCode < 300 || responseCode >= 400) { // Response code other than 3xx
boolean html = isHTML();
boolean js = isJs();
if (html || js){
charset(); // set it
final byte[] data = data();
INSERT HERE ===> if ((data[0] == -1) && (data[1] == -2)) charset="UTF-16";
if (data == null) {
dataString = "";
} else {