Tikal errir with input file that is quoted and has a wildard.
This error does not happen when you use quotes but not wildcard, and wildcard but not quotes.
tikal.bat -xm "D:\websites*.html" -sl ja-jp -ie utf-8 -trace
Okapi Tikal - Localization Toolset Version: 2.1.41.0
Trace: 1 class net.sf.okapi.applications.tikal.Main Trace: 2 ProtectionDomain (file:/C:/Users/user/Downloads/okapi-apps_win32-x86_64_1.41.0/lib/okapi-application-tikal-1.41.0.jar <no signer certificates>) sun.misc.Launcher$AppClassLoader@30f39991 <no principals> java.security.Permissions@5c645b43 ( ("java.io.FilePermission" "\C:\Users\user\Downloads\okapi-apps_win32-x86_64_1.41.0\lib\okapi-application-tikal-1.41.0.jar" "read") ("java.lang.RuntimePermission" "exitVM") )
Trace: 3 (file:/C:/Users/user/Downloads/okapi-apps_win32-x86_64_1.41.0/lib/okapi-application-tikal-1.41.0.jar <no signer certificates>) Trace: 4 file:/C:/Users/user/Downloads/okapi-apps_win32-x86_64_1.41.0/lib/okapi-application-tikal-1.41.0.jar Trace: 5 /C:/Users/user/Downloads/okapi-apps_win32-x86_64_1.41.0/lib/okapi-application-tikal-1.41.0.jar Extraction to Moses InlineText net.sf.okapi.common.exceptions.OkapiException: Error while trying to guess language information. D:\websites*.html (�ļ�����Ŀ¼�����������ȷ��) at net.sf.okapi.common.FileUtil.guessLanguages(FileUtil.java:149) at net.sf.okapi.applications.tikal.Main.guessMissingLocales(Main.java:849) at net.sf.okapi.applications.tikal.Main.process(Main.java:1013) at net.sf.okapi.applications.tikal.Main.main(Main.java:604)
Comments (2)
-
-
I took a brief look at this and I think Wei is right that Windows cmd doesn’t expand the wildcard before passing to each command. It’s up to the command to interpret the wildcard pattern.
Currently, tikal.bat is just passing all parameters as %*. So “tikal -x abc*.txt” will invoke the Java class net.sf.okapi.applications.tikal.Main sees “-x” and “abc*.txt” as its parameters.The DOS FOR loop can be used to let CMD to take care of expanding the wildcard like this:
set filearg="%*" for %%i in (%filearg%) do ( echo %%i )
If we can find a way to construct a variable that holds a list of arguments and a way to pass that variable to the Java Main, this can be solved without adding extra Windows-only logic to the Java program. Unfortunately I couldn’t find such a formula.
- Log in to comment
I am the original anonymous poster, and I use Windows 10. For your further infomation: