I work on task about zipping of files with non-ASCII characters in their names.
During this work I discovered that Java console in Domino Designer does not display non-ASCII characters. I do not know if it is an issue or it is by design but anyway it is quite annoying and does not help me to debug solution based on LS2J.
If you want to reproduce it yourself please check my steps first.
1) First you have to set UTF-8 in "Text file encoding" section of IDE, otherwise you will not be able to use non-ASCII characters in editor
2) Then create a Java library with something like this:
public class Test {
public String nonAscii() {
String a = "ØØØ";
System.out.println("some text = " + a);
return a;
}
}
3) Then create an agent with the following lotusscript:
Option Public
Option Declare
UseLSX "*javacon"
Use "Test"
Sub Initialize
Dim js As JAVASESSION
Dim zipClass As JAVACLASS
Dim zipFileObject As JavaObject
Set js = New JAVASESSION
Set zipClass = js.GetClass("Test")
Set zipFileObject = zipClass.CreateObject
MsgBox zipFileObject.nonAscii()
End Sub
4) Let's check what we have
As you see, characters are correct because lotusscript displayed them correctly in opposite to Java console.
Another one odd thing is that when I reopened Java code in editor I saw that non-ASCII characters were replaces with something strange.
So I have two questions:
1)
2) What is it about this replace of characters?
Thanks in advance.
---------------------------
Updated on 25.10.2020
Can be fixed by adding JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 to system environment. Found that solution there: https://www.pradny.com/2016/02/domino-classic-java-elements-encoding.html
It worked for me in HCL Notes 11.
This bug is in place from 8.5.2, and not yet resolved in 9.0.1 even many customers complain. http://www-01.ibm.com/support/docview.wss?uid=swg1LO57513
ReplyDelete