lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bowesman Antony" <>
Subject OT: Parsing Russian text from RTF
Date Fri, 16 May 2008 02:52:00 GMT
Not directly Lucene related, but I'm out of ideas and I'm not a Russian speaker...

I'm extracting text from RTF to pump into Lucene.  I'm using the original 
RTFEditorKit() code shown in LIA, p252 (actually, it's Nutch's RTFParser)

I have an RTF document, which starts with

Times New Roman;}Times New Roman CYR;}{\f1\fswiss\fprq2\fcharset0 Arial;}}
{\colortbl ;\red0\green0\blue128;\red0\green0\blue0;}

which should be 'Большинство', but when the RTFReader translationTable always 
maps the RTF bytes to char using latin1 and it never sets the correct 
translationTable.  The "fcharset204" is Russian, apparently CP1251, but there's 
a lovely line in the RTFReader class

/* TODO: per-font font encodings ( \fcharset control word ) ? */

Does anyone know if the RTF above is correct - the only place the translation 
table is set during the parse is when the 'ansi' keyword is set.

Other than that, anyone have any ideas about getting the text out of the RTF 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message