commandsToExecute = new BufferedReader(new FileReader(
options.getStringOption("executeFile")));
BufferedReader in = new BufferedReader(
new InputStreamReader(
new FileInputStream(options.getStringOption("executeFile")), <encoding from additional parameter>));
Fortunately, SemanticSpaceExplorer has also an option to input commands from a file using "-f" argument.However, currently SSE opens this file using following code:commandsToExecute = new BufferedReader(new FileReader(
options.getStringOption("executeFile")));That causes Java to use default system file.encoding, which on Windows is not Unicode.One option to solve that is to set an environment variable JAVA_TOOL_OPTIONS with value "-Dfile.encoding=UTF8". However, that would be a bit confusing for users with non-IT background and my primary concern is to enable non-IT users browse my Semantic Space using SSE.
Therefore, a better option would be to make a small change in the code of SSE and instead of the code above use something similar to that:BufferedReader in = new BufferedReader(
new InputStreamReader(
new FileInputStream(options.getStringOption("executeFile")), <encoding from additional parameter>));and also add another SSE argument for defining command file encoding and possibly another for encoding of file with command output (file defined with "-s" option), but I would need to further check that output issue.I would be happy to implement all of those required changes. Please let me know what do you think about that.
--Regards,Marcin
You received this message because you are subscribed to the Google Groups "Semantic Space Research - Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s-space-research...@googlegroups.com.
To post to this group, send email to s-space-re...@googlegroups.com.
Visit this group at http://groups.google.com/group/s-space-research-dev.
For more options, visit https://groups.google.com/d/optout.
Hi Marcin,
Regards,Marcin
To unsubscribe from this group and stop receiving emails from it, send an email to s-space-research-dev+unsub...@googlegroups.com.
Defaulting SSE to UTF8 would be enough for me. It sounds good. However, why you say it would remove the need for a patch? You would still need to add small changes in the SSE code.
There is a problem with the "-Dfile.encoding=utf8" parameter.As I understand it's not supported in all Java versions as a parameter for "java" command.I also tested that on my machine. Didn't work.Only setting JAVA_TOOL_OPTIONS to "-Dfile.encoding=utf8" can do that job reliably.Also it seems more convenient for a user to pass a parameter to SSE than change an environment variable. Also changing JAVA_TOOL_OPTIONS could affect other applications, so shouldn't be changed permanently by users.Defaulting SSE to utf8 sounds best for me. However, I think SSE should also enable user to use different encoding when required. So a parameter would be necessary.What do you think about that?
To unsubscribe from this group and stop receiving emails from it, send an email to s-space-research...@googlegroups.com.
Thanks,
Hi Marcin,
Regards,Marcin
To unsubscribe from this group and stop receiving emails from it, send an email to s-space-research-dev+unsubscrib...@googlegroups.com.
To post to this group, send email to s-space-re...@googlegroups.com.
Visit this group at http://groups.google.com/group/s-space-research-dev.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to s-space-research...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Semantic Space Research - Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/s-space-research-dev/RzGd7uhWjLE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to s-space-research...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Semantic Space Research - Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/s-space-research-dev/RzGd7uhWjLE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to s-space-research-dev+unsub...@googlegroups.com.