if (!deleteIndex(model.name)) {\r
return result;\r
}\r
- try { \r
+ try {\r
+ String [] encodings = storedSettings.getStrings(Keys.web.blobEncodings).toArray(new String[0]);\r
FileBasedConfig config = getConfig(repository);\r
Set<String> indexedCommits = new TreeSet<String>();\r
IndexWriter writer = getIndexWriter(model.name);\r
}\r
in.close();\r
byte[] content = os.toByteArray();\r
- String str = new String(content, Constants.CHARACTER_ENCODING);\r
+ String str = StringUtils.decodeString(content, encodings); \r
doc.add(new Field(FIELD_CONTENT, str, Store.YES, Index.ANALYZED));\r
os.reset();\r
} \r