[Yazlist] php5-yaz 1.0.13 error encoding iso-8859-1

Adam Dickmeiss adam at indexdata.dk
Wed Nov 28 12:33:14 CET 2007


Marc Cromme wrote:
> Miguel A. Calvo wrote:
>> Hi
>>  
>> I use php5-yaz version 1.0.13 in my program and the xml return from this 
>> sentence isn't correct.
>>  
> 
> When you say: 'is not correct', what do you mean by that??
> 
> Please remember that a marc-8 encoding is something reserved for binary 
> MARC-21 records. XML does not know of this encoding, there you usually 
> wish to use UTF-8 or  - maybe - ISO-8859-1.
> 
> Essentially, you are asking for the impossible ... marc-8 in XML ..
Not according to yaz_record.

  yaz_record($yaz_id, $i, "xml;charset=marc-8,ISO-8859-1")

tries to convert a received record to XML. If an ISO2709-type of record 
(such as USMARC) is received the result is MARCXML. The charset says to 
treat that MARC record as MARC-8 which may be true for USMARC/MARC21. 
The ISO-8859-1 says that the resulting XML be encoded in Latin-1.

/ Adam

> And there is no need to specify the encoding at all, as this is 
> self-contained information in XML files, and the default is UTF-8, which 
> is understood by all XML parsers.
> 
> Try just the simple and plain
> 
> yaz_record($yaz_id, $i, "xml")
> 
> 
> 
> Marc Cromme, Index Data
> 
>> *yaz_record($yaz_id, $i, "xml;charset=marc-8,ISO-8859-1")*
>>
>> and with the versión 1.0.8 all it´s ok
>>
>> Can you help me? 
>>
>>  
>>
>> **
>>
>> **
>>
>> *Miguel A. Calvo Lázaro*
>>
>> Técnico de Software Factory
>>
>> *miguel.calvo at coremain.com <mailto:miguel.calvo at coremain.com>*
>>
>> http://www.coremain.com <http://www.coremain.com/>
>>
>>  
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Yazlist mailing list
>> Yazlist at lists.indexdata.dk
>> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist
> 
> 




More information about the Yazlist mailing list