You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "Eder, Johann" <jo...@manz.at> on 2010/10/28 15:34:28 UTC

search for non-breaking spaces

Hi there,

has anyone an idea how to search for non-breaking spaces ?

I used '\u00A0' or '&#160;' or '&nbsp;' which does not work:

String xPath = "/jcr:root/bibliothek//*[jcr:contains(.,'\u00A0')]";

Result is 0. 
Thanks.

Johann

 

Re: AW: search for non-breaking spaces

Posted by Alexander Klimetschek <ak...@adobe.com>.
On 29.10.10 15:03, "Eder, Johann" <jo...@manz.at> wrote:

>Hello Fabian,
>
>thanks for the hint.
>
>Unfortunately it doesn't work.
>
>I use Java and UTF-8 Encoding.
>Other text strings like 'house' etc. are found...only Non Breaking Spaces
>are not...
>
>
>Any other hint?

I would guess this char is (correctly) detected as whitespace by the
Lucene full text analyzer and hence you can't search for it.


Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel





AW: search for non-breaking spaces

Posted by "Eder, Johann" <jo...@manz.at>.
Hello Fabian,

thanks for the hint.

Unfortunately it doesn't work.

I use Java and UTF-8 Encoding.
Other text strings like 'house' etc. are found...only Non Breaking Spaces are not...


Any other hint?

Johann



-----Ursprüngliche Nachricht-----
Von: Fabián Mandelbaum [mailto:fmandelbaum@gmail.com] 
Gesendet: Donnerstag, 28. Oktober 2010 16:36
An: users@jackrabbit.apache.org
Betreff: Re: search for non-breaking spaces

Hello Johann,

did you try with _x0020_ ?

On Thu, Oct 28, 2010 at 10:34 AM, Eder, Johann <jo...@manz.at> wrote:
> Hi there,
>
> has anyone an idea how to search for non-breaking spaces ?
>
> I used '\u00A0' or '&#160;' or '&nbsp;' which does not work:
>
> String xPath = "/jcr:root/bibliothek//*[jcr:contains(.,'\u00A0')]";
>
> Result is 0.
> Thanks.
>
> Johann
>
>
>



-- 
Fabián Mandelbaum
IS Engineer

Re: search for non-breaking spaces

Posted by Fabián Mandelbaum <fm...@gmail.com>.
Hello Johann,

did you try with _x0020_ ?

On Thu, Oct 28, 2010 at 10:34 AM, Eder, Johann <jo...@manz.at> wrote:
> Hi there,
>
> has anyone an idea how to search for non-breaking spaces ?
>
> I used '\u00A0' or '&#160;' or '&nbsp;' which does not work:
>
> String xPath = "/jcr:root/bibliothek//*[jcr:contains(.,'\u00A0')]";
>
> Result is 0.
> Thanks.
>
> Johann
>
>
>



-- 
Fabián Mandelbaum
IS Engineer