Hi,

On Tue, Feb 8, 2011 at 11:18 PM, Alex Lujan <[email protected]> wrote:

> Im having an issue with parsing an input that contains unicode characters.
>
> This is the code Im using to test the parser (messageBytes is an array
> created by reading bytes from a binary file):
>
> private static void parseMessage(byte[] messageBytes) throws IOException{
>
>        ByteArrayInputStream input = new ByteArrayInputStream(messageBytes);
>        ANTLRInputStream in = new ANTLRInputStream(input);
>          ...


You'll probably want to set the *encoding* of the input using:

ANTLRInputStream<http://www.antlr.org/api/Java/classorg_1_1antlr_1_1runtime_1_1_a_n_t_l_r_input_stream.html#cc37ee52e581d61a2efef0413ae3366f>
 (InputStream input, String encoding)


Regards,

Bart.

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to