Eric,
I think that should fix it - as Marc says, if the data is passed by the
SRU target in utf-8 you should be able to pass it on without
modification as utf-8, but you need to be sure any text your software
inserts is also in utf-8. This is probably not seen as a problem as the
text you add will probably be just ASCII, but if you add any Latin1
characters above 127 these will have to be encoded as utf-8.
Bill
> -----Original Message-----
> From: Z39.50 Next-Generation Initiative [mailto:[log in to unmask]] On Behalf
Of
> Eric Lease Morgan
> Sent: 26 September 2005 22:45
> To: [log in to unmask]
> Subject: Re: spell checker inside an sru client [encoding]
>
> On Sep 26, 2005, at 4:21 PM, marc wrote:
>
> >>> But the response will contain records using utf-8 which doesn't
> >>> seem to
> >>> display correctly. Try "lenin single works" .
> >>>
> >>>> http://spell.ockham.org/bl/
> >>
> >> I feel like the Ugly American because I do not know how to
> >> resolve this problem, and it appears in many of my other
> >> implementations.
> >> What encoding should I add to my output so it works correctly?
> >
> > well, whatever encoding there was used in the recods in the first
> > place.
> >
> > My experience with all this encoding problems is that you need to
> > do three-four things right
> >
> > 1) know which encoding you are coming from
> > 2) know which encoding you want to go to
> > 3) apply the right encoding transformation
> > 4) label your XML with the right encoding afterwards
>
> By changing my Perl code from:
>
> print $cgi->header(-type => 'text/html');
>
> to:
>
> print $cgi->header(-type => 'text/html', -charset => 'UTF-8');
>
> I was able to make the query above work. Try:
>
> http://spell.ockham.org/bl/?cmd=search&query=lenin+single+works
>
> I think I'm headed in the right direction.
>
> --
> Eric Lease Morgan
> University Libraries of Notre Dame
**************************************************************************
Experience the British Library online at www.bl.uk
Help the British Library conserve the world's knowledge. Adopt a Book. www.bl.uk/adoptabook
The Library's St Pancras site is WiFI - enabled
**************************************************************************
The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the [log in to unmask] : The contents of this e-mail must not be disclosed or copied without the sender's consent.
The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author.
**************************************************************************
|