Katalon Studio Unicode Error Displaying Japanese Characters

*Summary
I am facing an issue with Katalon Studio where Japanese characters are not displayed correctly. The issue seems to be related to Unicode handling in the log viewer.
Below are the details the environment I am using

*My code

    'Verify payment message'
	List<WebElement> listFileElement = baseScreen.getListElement('Android/Owner/Payment/UsageDetails/chat_lbl_list_message_content_attachment_file')
	String message = listFileElement.get(0).getAttribute('contentDescription')

	baseScreen.verifyContaint(message, "[${paymentRoom}]-[${paymentName}]オンライン決済のお願い。\n決済有効期限は${paymentExpiryDate}")
	baseScreen.verifyContaint(message, '決済を開始する')

*Actual Results
Log Viewer: Unicode Error Displaying Japanese Characters
*Screenshots / Videos


*Operating System
Windows 11

*Katalon Studio version
Katalon Studio Free 10.1.0

If I remember correctly, this source code of mine did not encounter a Unicode issue when running with Katalon Studio version 8.x. (same environment)

1 Like

Hi Duc Anh, :wave:

Thank you for sharing this bug with us.

I’ll tag our Studio team members here @philipB and @xuan.tran so that they can take a closer look.

Thanks,
Albert

1 Like

Katalon does not provide a keyword verifyContaint at all. It seems to be your own custom Java/Groovy class/method. I have a doubt that your custom class/method does not handle Unicode appropriately.

1 Like

Thank you for the response.
I think that not only the custom classes/methods are having issues; I tried using Katalon’s built-in methods, and the same error occurred.

I tried to reproduce your case on my machine:

  • Windows 11
  • Katalon Studio Free 10.1.0

I created a Test Case “TC1”:

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile

Mobile.comment("オンライン決済のお願い")

I ran it. In the LogViewer in the TreeView, I saw “オンライン決済のお願い” rendered normally.

In the LogViewer in the TableView, there was no garbled characters

In the Console tab, it was fine:

I created a Test Suite “TS1” which contains the “TC1”. I ran the TS1 and got an HTML report . The message オンライン決済のお願い was rendered normally:

I checked the script file to see in which character encoding the file was saved. The file was saved in UTF-8.

In the folder where Katalon Studio is installed, I found the file katalon.ini. I checked it. It had a line

-Dfile.encoding=UTF-8

Eclipse Settings for text file encoding :slight_smile:

@le.duc.anh

I could not reproduce your problem on my side.

1 Like

See also

but possibly this may not be relevant to @le.duc.anh 's case

1 Like

Hi @kazurayam
thank you for the help
I have checked the encoding-related configs and they are complete (just like yours).
My console log doesn’t have any errors.
The HTML report also doesn’t have errors.

I am only encountering encoding errors in the Logviewer :thinking:

We need to break down the problem.

To be exact, in which places do you see the garbled characters? In which places Japanese characters are normally rendered? Please enumerate the result and show us. Only in the TreeView of the LogViewer? Which portion of the system do you think we need to look into more?

Sorry for the lack of clarity.
Currently, after checking the places where I’m using it, the Japanese characters are only displaying incorrectly in the Logviewer (as shown in the two images I provided below).


Other related areas such as the code files, HTML report, and console log are displaying correctly.

LogViewer has 2 formats of view:

You showed the “Tree view”.

How about another “Table view”

Is a Japanese character string garbled there?

You can switch these 2 formats of view by togglen the button on the top-right corner of the LogViewer
image

I have provided both images above, and both are showing the same error

Thank you for your information.

Now, I think we have done enough investigations. Apparently there seems to be a bug in the LogViewer of Katalon Studio GUI. We should pass this issue to Katalon developers.

@albert.vu @Elly_Tran @Shin

1 Like