Hi, I'm having some strange errors with VietOCR on ArchLinux. I start the program using
./ocr
I try to open a new file. But VietOCR won't read my Documents folder. I get the following:
Exception in thread "Basic L&F File Loading Thread" java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /.../Downloads/Docs of Sort/????????????.html
at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:121)
at java.base/sun.nio.fs.UnixPath.(UnixPath.java:68)
at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:278)
at java.base/java.nio.file.Path.of(Path.java:147)
at java.base/java.nio.file.Paths.get(Paths.java:69)
at java.desktop/sun.awt.shell.ShellFolder.getShellFolder(ShellFolder.java:262)
at java.desktop/javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:585)
at java.desktop/javax.swing.plaf.basic.BasicDirectoryModel$FilesLoader.run0(BasicDirectoryModel.java:306)
at java.desktop/javax.swing.plaf.basic.BasicDirectoryModel$FilesLoader.run(BasicDirectoryModel.java:295)
at java.base/java.lang.Thread.run(Thread.java:1589)
It just gives me a spinning cursor, until I cancel. I get this error with several different folders.
Exception in thread "Basic L&F File Loading Thread" java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /.../Documents/xkeyboard-config_chromebook.patch at master ?? GalliumOS_xkeyboard-config ?? GitHub.html
In each case the error is the same. It happens with files in different languages, not just English.
This does NOT happen if I start with
java -jar VietOCR.jar
But if I start with the JAR file, I sometimes run into Out of Memory or Java Heap errors. So I like to start with the OCR executable.
Suggestions? I am on ArchLinux 6.1.12-arch1-1 with openjdk 19.0.2 2023-01-17, OpenJDK Runtime Environment (build 19.0.2+7), and OpenJDK 64-Bit Server VM (build 19.0.2+7, mixed mode).
Last edit: Omar Willey 2023-02-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It appears that the program cannot read the specified file because of the file name or path contains Unicode characters. At the beginning of the script, export LC_ALL=C was set, which might have interfered with that.
Hi, I'm having some strange errors with VietOCR on ArchLinux. I start the program using
I try to open a new file. But VietOCR won't read my Documents folder. I get the following:It just gives me a spinning cursor, until I cancel. I get this error with several different folders.
In each case the error is the same. It happens with files in different languages, not just English.
This does NOT happen if I start with
But if I start with the JAR file, I sometimes run into Out of Memory or Java Heap errors. So I like to start with the OCR executable.
Suggestions? I am on ArchLinux 6.1.12-arch1-1 with openjdk 19.0.2 2023-01-17, OpenJDK Runtime Environment (build 19.0.2+7), and OpenJDK 64-Bit Server VM (build 19.0.2+7, mixed mode).
Last edit: Omar Willey 2023-02-16
It appears that the program cannot read the specified file because of the file name or path contains Unicode characters. At the beginning of the script,
export LC_ALL=C
was set, which might have interfered with that.https://www.ibm.com/support/pages/what-lcall-variable
You can either remove that line or run at the command line with options to give more heap memory for Java program startup.
java -Xms128m -Xmx2048m -jar VietOCR.jar
https://docs.oracle.com/en/java/javase/13/docs/specs/man/java.html