[Koha-zebra] Re: Unimarc, marc21, Unicode, and MARC::File::XML
Paul POULAIN
paul.poulain at free.fr
Mon Mar 20 12:18:16 CET 2006
Mike Rylander a écrit :
> I tested with the record you sent Ed and me, and everything seems to
> work for me ...
> As you can see, I tested several variants of the UNIMARC flag, and
> even tested not sending the encoding to new_from_xml() ... it all
> seems to work for me, and I'm not sure what problems you're seeing.
> Perhaps you just needed to set your binmode for the XML source?
strange, strange...
What does my script :
* retrieve the MARC::Record from zebra
* read some datas from mysql
* build a page with HTML::Template
* send the pages to the browser
I added 3 lines to save the record in a file after reading from zebra.
Adding binmode(F,':utf8');
before saving my record in F, give me correct UTF-8.
without binmode, it's NOK.
But when I put the MARC::record in a page builded with HTML::Template,
it's wrong.
The HTML is utf-8 (html page encoding).
It also contains some strings from mySQL and all strings from mySQL
appear as correct utf8 while all strings coming from the MARC::record
coming from zebra are not !
I can add "binmode()" to the template output, but everything goes wrong
with strings from mySQL.
Any suggestion welcomed !
--
Paul POULAIN et Henri Damien LAURENT
Consultants indépendants
en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
More information about the Koha-zebra
mailing list