You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Claudio Martella <cl...@tis.bz.it> on 2009/10/08 18:48:21 UTC

UTF-8 and latin accents

Hello list,

I'm trying to index documents with latin accents (italian documents). I
extract the text from .doc documents with Tika directly into .xml files.
If i open up the XML document with my Dashcode (i run mac os x) i can
see the characters correctly. my xml document is an xml document with the
<?xml version="1.0" encoding="UTF-8"?>
<add><doc>
...
headers.

When i search and retrieve documents in solr the accented characters are
replaced by an '?'. What is the problem?
I guess the problem could be in (1) the schema (2) the xml document file
coding itself (i don't see the characters correctly if i open it up with
vim in terminal).

Any suggestions? thanks

-- 
Claudio Martella
Digital Technologies
Unit Research & Development - Engineer

TIS innovation park
Via Siemens 19 | Siemensstr. 19
39100 Bolzano | 39100 Bozen
Tel. +39 0471 068 123
Fax  +39 0471 068 129
claudio.martella@tis.bz.it http://www.tis.bz.it

Short information regarding use of personal data. According to Section 13 of Italian Legislative Decree no. 196 of 30 June 2003, we inform you that we process your personal data in order to fulfil contractual and fiscal obligations and also to send you information regarding our services and events. Your personal data are processed with and without electronic means and by respecting data subjects' rights, fundamental freedoms and dignity, particularly with regard to confidentiality, personal identity and the right to personal data protection. At any time and without formalities you can write an e-mail to privacy@tis.bz.it in order to object the processing of your personal data for the purpose of sending advertising materials and also to exercise the right to access personal data and other rights referred to in Section 7 of Decree 196/2003. The data controller is TIS Techno Innovation Alto Adige, Siemens Street n. 19, Bolzano. You can find the complete information on the web site www.tis.bz.it.



Re: UTF-8 and latin accents

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Thu, Oct 8, 2009 at 12:48 PM, Claudio Martella
<cl...@tis.bz.it> wrote:
> I'm trying to index documents with latin accents (italian documents). I
> extract the text from .doc documents with Tika directly into .xml files.
> If i open up the XML document with my Dashcode (i run mac os x) i can
> see the characters correctly. my xml document is an xml document with the
> <?xml version="1.0" encoding="UTF-8"?>
> <add><doc>
> ...
> headers.

Maybe those documents aren't actually in UTF8.
Why don't you try Solr's example/exampledocs/utf8-example.xml

> When i search and retrieve documents in solr the accented characters are
> replaced by an '?'. What is the problem?
> I guess the problem could be in (1) the schema (2) the xml document file
> coding itself (i don't see the characters correctly if i open it up with
> vim in terminal).

in vim/gvim try
:set encoding=utf8

-Yonik
http://www.lucidimagination.com