Katalon.ini should speciify -Dfile.encoding=utf-8


#1

My experiment

I use Katalon Studio v6.1.3, on Windows 10.

I made a Test Object for Web Service Request to https://news.yahoo.co.jp/pickup/rss.xml. I tested it and got the following response. The response page displayed non-latin characaters garbled. I wanted to solve this.

My study

Using Chromes DevTool, I confirmed that the response was in charset=UTF-8:

In Katalon Studio, Window > Katalon Studio Preference > General > Workspace, I found the following:

It seemed that Katalon Studio is recognizing file encoding of MS932 and UTF-8. Default is MS932, but in GUI UTF-8 is marked selected. — It is not clear which is actually selected by Katalon Studio.

However, the garbled characters in the display of Web Response certainly indicates that Katalon Studio on my PC uses MS932, not UTF-8.

My trial

I changed C:\Users\myname\Katalon_Studio_Windows_64-6.1.3\katalon.ini so that it includes a line of

-Dfile.encoding=utf-8

I restarted Katalon Studio and tried the same test. This time, no garbled characters found. Much improved.

My suggestion

Newer version of Katalon Studio should be delivered with the katalon.ini file with a line of -Dfile.encoding=utf-8 defined.

Notes

In the Katalon Forum, a few posts reports garbled characters

Having -Dfile.encoding=utf-8 would eliminate repeating this sort of confusions in future.

Thanks

@Monster suggested to use OS-level Environment Variable JAVA_TOOL_OPTIONS to specify -Dfile.encoding


Of course, his method also works.


Getting 400 error (Bad Request) when hitting api response contains umlaut (german language) as one of the parameter
Bug in VietNamese font, please help
Gibberish in response
UTF-8 SOAP Response not correctly displayed in right response window
#2

hidden may be the path of encoding …
@kazurayam nice catch!


#3

Totally. In fact, I’d call this a bug with a provided fix, not a “suggestion”.


#4

u are welcome


#5

I have tried your method also works. thx.


#6

@devalex88
@Dung_Ngo
@ThanhTo

Please support this fix in a future KS release.


#7

It works. Excellent. Thanks! One line in katalon.ini -Dfile.encoding=utf-8


#8

@duyluong This seems to be a necessary change.

@kazurayam Thank you so much for this diligent work.


#9

@devalex88, @duyluong

Please pay attention to the following point.

Even when I select “UTF-8” in GUI intending to overwrite the default setting (MS932), KS seems to ignore it. KS uses MS932. This could be a bug.


#10

I found that the v6.3.3 added the following line in katalon.ini file of

-Dfile.encoding=utf-8

#11