[Java]: Corrected serialization of IR to use schema defined character encoding.