mò &U²Ic@sldZdkZdkZeiZdd„Zdeifd„ƒYZdeifd„ƒYZd„ZdS( s‚ Python 'utf-16' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. NtstrictcCsti||tƒS(N(tcodecst utf_16_decodetinputterrorstTrue(RR((t-/data/zmath/lib/python2.4/encodings/utf_16.pytdecodest StreamWritercBs tZdd„Zdd„ZRS(NRcCs#t|_tii|||ƒdS(N(tFalsetselft bom_writtenRRt__init__tstreamR(R R R((RR s cCsKt|_ti||ƒ}ti djoti |_ n ti |_ |S(Ntlittle( RR R Rt utf_16_encodeRRtresulttsyst byteordertutf_16_le_encodetencodetutf_16_be_encode(R RRR((RRs   (t__name__t __module__R R(((RRs t StreamReadercBstZd„Zdd„ZRS(NcCs4tii|ƒy |`Wntj onXdS(N(RRtresetR RtAttributeError(R ((RR"s  RcCsti||dtƒ\}}}|djoti|_ n8|djoti |_ n|djo t d‚n||fS(Niiÿÿÿÿiis%UTF-16 stream does not start with BOM( Rtutf_16_ex_decodeRRR tobjecttconsumedRtutf_16_le_decodeR Rtutf_16_be_decodet UnicodeError(R RRRRR((RR)s!    (RRRR(((RR s cCsttttfS(N(RRRR(((Rt getregentry6s( t__doc__RRRRRRRR!(RRRRR!RR((Rt?s