[CODE4LIB] find in page, diacritics, etc

2009-08-28 Thread Tim Shearer

Hi Folks,

Looking for help/perspectives.

Anyone got any clever solutions for allowing folks to find a word with 
diacritics in a rendered web page regardless of whether or not the user 
tries with or without diacritics.


In indexes this is usually solved by indexing the word with and without, 
so the user gets what they want regardless of how they search.


Thanks in advance for any ideas/enlightenment,
Tim


Re: [CODE4LIB] find in page, diacritics, etc

2009-08-28 Thread Joe Atzberger
Something like the jquery highlight function combined with this kind of
mapping:

http://stackoverflow.com/questions/863800/replacing-diacritics-in-javascript

If you don't mind, you can speed things up by forcing the comparison sets to
be in one case or the other.
--Joe

On Fri, Aug 28, 2009 at 12:17 PM, Tim Shearer sh...@ils.unc.edu wrote:

 Hi Folks,

 Looking for help/perspectives.

 Anyone got any clever solutions for allowing folks to find a word with
 diacritics in a rendered web page regardless of whether or not the user
 tries with or without diacritics.

 In indexes this is usually solved by indexing the word with and without, so
 the user gets what they want regardless of how they search.

 Thanks in advance for any ideas/enlightenment,
 Tim



Re: [CODE4LIB] find in page, diacritics, etc

2009-08-28 Thread Keith Jenkins
Hi, Tim.

Are you are referring to a find in page, where a user presses CTRL-F
in the browser?

If so, it will depend on the browser.  Google Chrome 2.0 will find
matches regardless of the diacritics (i.e. user can type placa and
it matches plaça, and vice versa).  This doesn't seem to work in
Firefox 3.0.13 or IE8.

Keith


On Fri, Aug 28, 2009 at 12:17 PM, Tim Shearersh...@ils.unc.edu wrote:
 Hi Folks,

 Looking for help/perspectives.

 Anyone got any clever solutions for allowing folks to find a word with
 diacritics in a rendered web page regardless of whether or not the user
 tries with or without diacritics.

 In indexes this is usually solved by indexing the word with and without, so
 the user gets what they want regardless of how they search.

 Thanks in advance for any ideas/enlightenment,
 Tim



Re: [CODE4LIB] find in page, diacritics, etc

2009-08-28 Thread Tim Shearer

Are you are referring to a find in page, where a user presses CTRL-F
in the browser?


Yes, sorry to be unclear.


If so, it will depend on the browser.  Google Chrome 2.0 will find
matches regardless of the diacritics (i.e. user can type placa and
it matches pla�a, and vice versa).  This doesn't seem to work in
Firefox 3.0.13 or IE8.


Exactly, and FF and IE are the most common browsers we're seeing.

I was wondering if someone (I know this sounds crazy) has explored the 
idea of marking up the non-diacritic inline version of the word in a span 
styled in such a way as to make it findable but not intrusive.


-t


Keith


On Fri, Aug 28, 2009 at 12:17 PM, Tim Shearersh...@ils.unc.edu wrote:

Hi Folks,

Looking for help/perspectives.

Anyone got any clever solutions for allowing folks to find a word with
diacritics in a rendered web page regardless of whether or not the user
tries with or without diacritics.

In indexes this is usually solved by indexing the word with and without, so
the user gets what they want regardless of how they search.

Thanks in advance for any ideas/enlightenment,
Tim



Re: [CODE4LIB] find in page, diacritics, etc

2009-08-28 Thread Ken Irwin
This sounds like a great idea for a Firefox plugin...

Ken

 -Original Message-
 From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of
 Tim Shearer
 Sent: Friday, August 28, 2009 12:18 PM
 To: CODE4LIB@LISTSERV.ND.EDU
 Subject: [CODE4LIB] find in page, diacritics, etc
 
 Hi Folks,
 
 Looking for help/perspectives.
 
 Anyone got any clever solutions for allowing folks to find a word with
 diacritics in a rendered web page regardless of whether or not the user
 tries with or without diacritics.
 
 In indexes this is usually solved by indexing the word with and without,
 so the user gets what they want regardless of how they search.
 
 Thanks in advance for any ideas/enlightenment,
 Tim


Re: [CODE4LIB] find in page, diacritics, etc

2009-08-28 Thread Joe Hourcle



On Fri, 28 Aug 2009, Keith Jenkins wrote:


Hi, Tim.

Are you are referring to a find in page, where a user presses CTRL-F
in the browser?

If so, it will depend on the browser.  Google Chrome 2.0 will find
matches regardless of the diacritics (i.e. user can type placa and
it matches pla?a, and vice versa).  This doesn't seem to work in
Firefox 3.0.13 or IE8.


Works in Safari 4.0.3, fails in Firefox 3.5.2

Here's a page to test with, using the correct (non-americanized) spelling 
of my name:


http://www.frbr.org/2009/01/15/hourcle-frbr-applied-to-scientific-data


As for tricks to get it to work -- T\the closest HTML tag that I can think 
of is 'ABBR' which isn't quite right:


ABBR lang='fr' title='Hourcle'Hourcleacute;/ABBR

... and a quick test in Firefox 3.5 shows it doesn't help.

-Joe

(and no, it's not French, but it's a French spelling, so it'd clue the 
pronunciation for screen readers correctly