Re: testParsingWithoutUTF8Encoding Error
Hi,
I agree and like it too, but haven't found a straightforward way of doing this:
The constructor taking an InputStream only is generated automatically by JavaCC, which sends it to the constructor with encoding=null specified
public ADLParser(java.io.InputStream stream) {
this(stream, null);
}
This constructor therefore is fairly unsafe to use because it just assumes the system's default encoding.
Maybe we can hide it using this approach, which I think would be a breaking change though:
http://www.pisolutions.eu/node/11
Rong may have a far better idea how to change this behaviour.
Cheers
Sebastian
Fábio Nogueira de Lucena wrote:Hi Sebastian, Rong
there is a third option to consider: when ADLParser is used with only one argument the encoding used can be UTF-8 instead of the one used by the platform. In this case, no change to the tests are needed. But documentation should state clearly that UTF-8 is used when no specific encoding is provided. This is in accordance with "Support Information Model", page 18, section 3.3.1.1 which states: "... In openEHR, UTF-8 encoding is assumed".
Cheers,
Fábio
_______________________________________________ Ref_impl_java mailing list Ref_impl_java@openehr.org http://lists.chime.ucl.ac.uk/mailman/listinfo/ref_impl_java