On 3/20/06, Paul POULAIN <[EMAIL PROTECTED]> wrote: > 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
Are you getting XML or binary MARC from zebra? > > 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. > Are you using decode_utf8($mysql_string) to let Perl know that the database is UTF8 encoded? IIRC, MySQL doesn't know how to tell Perl about that, and the DBD::MySQL maintainer haven't added that functionality to the module yet. > Any suggestion welcomed ! > -- > Paul POULAIN et Henri Damien LAURENT > Consultants indépendants > en logiciels libres et bibliothéconomie (http://www.koha-fr.org) > -- Mike Rylander [EMAIL PROTECTED] GPLS -- PINES Development Database Developer http://open-ils.org