This question contains java and ruby. I have a java program that I make a call to from ruby.
This code works under merb perfectly without any modifications.
This code will work under irb perfectly by setting $KCODE="UTF8".
For the life of me I can not get it to work under phusion passenger -- this is a problem since our production server is under passenger but I spend most of my time with mongrel or something on my dev machine.
The setup is extremely simple.
Here is the java code: import java.io.; import java.util.;
public class Simple {
public static void main(String[] args) throws Exception {
System.out.println("Ç");
}
}
now here is the ruby code:
IO.popen("java -cp \"/home/me/pass\" Simple") do |f| @blah = f.read end
when ran under passenger/merb you should be able to do a Merb.logger.error(@blah) and get the EXACT same testdata -- like I said this works fine under merb and fine under irb if you set the KCODE but it does not work under passenger
UPDATE -- simplified everything