Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using Solr 1.4 and Tomcat6. DB mysql 5.1 store data latin. when i run dataimporthandler this data => view data in solr admin error font.

<doc>
<str name="id">295</str>
<str name="subject">Tuấn Tú</str>
−
...<arr name="title">
<str>tunt721</str>
</arr>
</doc>

True data view :

<doc>
<str name="id">295</str>
<str name="subject">Tuấn Tú</str>
−
...<arr name="title">
<str>tunt721</str>
</arr>
</doc>

help me fix problem. Many thanks

share|improve this question

1 Answer 1

You could try changing the unicode setting in your datasource to false:

 <dataSource type="JdbcDataSource"
    driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://host/databasename?zeroDateTimeBehavior=convertToNull&amp;useUnicode=false"
    encoding="iso-8859-1"
    user="username"
    password="password" />

A better solution would be to try and convert your database to unicode/UTF8 characterset.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.