apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.67k stars 1.03k forks source link

Creating PlainTextDictionary with UTF8 files [LUCENE-1413] #2487

Closed asfimport closed 15 years ago

asfimport commented 16 years ago

Generate indexes from text files is good, but can't read utf8 files. It can easily made by adding the following code to PlainTextDictionary.java:

public PlainTextDictionary(InputStream dictFile, String fileEncoding) throws UnsupportedEncodingException { in = new BufferedReader(new InputStreamReader(dictFile, fileEncoding)); }


Migrated from LUCENE-1413 by YourSoft, resolved Mar 19 2009 Environment:

All platform / operating systems
asfimport commented 15 years ago

Michael Busch (migrated from JIRA)

I'm closing this, because PlainTextDictionary has also the following public constructor:

/**

So you can just pass in the InputStreamReader(dictFile, fileEncoding) using this constructor.