This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 156117
Collapse All | Expand All

(-)file_not_specified_in_diff (-5 / +11 lines)
Line  Link Here
0
-- a/javafx.lexer/src/org/netbeans/lib/javafx/lexer/JFXLexer.java      Wed Mar 04 14:27:32 2009 +0100
0
++ b/javafx.lexer/src/org/netbeans/lib/javafx/lexer/JFXLexer.java      Mon Mar 09 11:57:23 2009 +0100
Lines 81-87 Link Here
81
            final LexerInputStream reader = new LexerInputStream();
81
            final LexerInputStream reader = new LexerInputStream();
82
            reader.setLexerInput(lexerInput);
82
            reader.setLexerInput(lexerInput);
83
            ANTLRReaderStream input = new ANTLRInputStream(reader);
83
            ANTLRReaderStream input = new ANTLRInputStream(reader, "UTF-8"); //NOI18N
84
            lexer = new v4Lexer(input);
84
            lexer = new v4Lexer(input);
85
            final LexerState ls = (LexerState) info.state();
85
            final LexerState ls = (LexerState) info.state();
86
            if (ls != null) {
86
            if (ls != null) {
Lines 154-168 Link Here
154
    static class LexerInputStream extends InputStream {
154
    static class LexerInputStream extends InputStream {
155
        private LexerInput input;
155
        private LexerInput input;
156
        private byte[] bytes = new byte[0];
157
        private int i = 0;
156
        public void setLexerInput(LexerInput input) {
158
        public void setLexerInput(LexerInput input) {
157
            this.input = input;
159
            this.input = input;
158
        }
160
        }
159
        public int read() throws IOException {
161
        public int read() throws IOException {
160
            final int c = input.read();
162
            if (i >= bytes.length) {
161
            if (c == LexerInput.EOF) return -1;
163
                final int c = input.read();
162
            return c;
164
                if (c == LexerInput.EOF) return -1;
165
                bytes = new String(new char[] {(char)c}).getBytes("UTF-8"); //NOI18N
166
                i = 0;
167
            }
168
            return bytes[i++];
163
        }
169
        }
164
    }
170
    }

Return to bug 156117