PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  i:Oc@sdZddlZddlmZddlmZmZddlmZddl m Z m Z m Z m Z mZmZdZdZdd Zded d d Zd d d d ZdZdZdZdS(s ----- UTF-8 ----- Functions for operating on byte :class:`str` encoded as :term:`UTF-8` .. note:: In many cases, it is better to convert to :class:`unicode`, operate on the strings, then convert back to :term:`UTF-8`. :class:`unicode` type can handle many of these functions itself. For those that it doesn't (removing control characters from length calculations, for instance) the code to do so with a :class:`unicode` type is often simpler. .. warning:: All of the functions in this module are deprecated. Most of them have been replaced with functions that operate on unicode values in :mod:`kitchen.text.display`. :func:`kitchen.text.utf8.utf8_valid` has been replaced with a function in :mod:`kitchen.text.misc`. iN(tb_(t to_unicodetto_bytes(tbyte_string_valid_encoding(t_textual_width_letbyte_string_textual_width_filltfillt textual_widthttextual_width_choptwrapcCs&tjtdtddt|S(s**Deprecated** Detect if a string is valid :term:`utf-8` Use :func:`kitchen.text.misc.byte_string_valid_encoding` instead. sjkitchen.text.utf8.utf8_valid is deprecated. Use kitchen.text.misc.byte_string_valid_encoding(msg) insteadt stackleveli(twarningstwarnRtDeprecationWarningR(tmsg((s5/usr/lib/python2.7/site-packages/kitchen/text/utf8.pyt utf8_valid@s cCs&tjtdtddt|S(s**Deprecated** Get the :term:`textual width` of a :term:`utf-8` string Use :func:`kitchen.text.display.textual_width` instead. s`kitchen.text.utf8.utf8_width is deprecated. Use kitchen.text.display.textual_width(msg) insteadR i(R R RR R(R((s5/usr/lib/python2.7/site-packages/kitchen/text/utf8.pyt utf8_widthJs cCs|tjtdtdd|dkr8t||fSt|t }t||}|rlt |}nt||fS(sA**Deprecated** Return a string chopped to a given :term:`textual width` Use :func:`~kitchen.text.display.textual_width_chop` and :func:`~kitchen.text.display.textual_width` instead:: >>> msg = 'く ku ら ra と to み mi' >>> # Old way: >>> utf8_width_chop(msg, 5) (5, 'く ku') >>> # New way >>> from kitchen.text.converters import to_bytes >>> from kitchen.text.display import textual_width, textual_width_chop >>> (textual_width(msg), to_bytes(textual_width_chop(msg, 5))) (5, 'く ku') sekitchen.text.utf8.utf8_width_chop is deprecated. Use kitchen.text.display.textual_width_chop insteadR iN( R R RR tNoneRt isinstancetunicodeRR(Rtchoptas_bytest chopped_msg((s5/usr/lib/python2.7/site-packages/kitchen/text/utf8.pytutf8_width_chopUs tc CsAtjtdtddt||d|d|d|d|S(s**Deprecated** Pad a :term:`utf-8` string to fill a specified width Use :func:`~kitchen.text.display.byte_string_textual_width_fill` instead sqkitchen.text.utf8.utf8_width_fill is deprecated. Use kitchen.text.display.byte_string_textual_width_fill insteadR iRtlefttprefixtsuffix(R R RR R(RRRRRR((s5/usr/lib/python2.7/site-packages/kitchen/text/utf8.pytutf8_width_fillss iFcCstjtdtddt|t }t|}t|d|d|d|}|r~g|D]}t|^qc}n|S(s**Deprecated** Similar to :func:`textwrap.wrap` but understands :term:`utf-8` data and doesn't screw up lists/blocks/etc Use :func:`kitchen.text.display.wrap` instead sVkitchen.text.utf8.utf8_text_wrap is deprecated. Use kitchen.text.display.wrap insteadR itwidthtinitial_indenttsubsequent_indent( R R RR RRRR R(ttextRRRRtlinestm((s5/usr/lib/python2.7/site-packages/kitchen/text/utf8.pytutf8_text_wraps   "cOs,tjtdtddt|||S(s**Deprecated** Similar to :func:`textwrap.fill` but understands :term:`utf-8` strings and doesn't screw up lists/blocks/etc. Use :func:`kitchen.text.display.fill` instead. sVkitchen.text.utf8.utf8_text_fill is deprecated. Use kitchen.text.display.fill insteadR i(R R RR R(R targstkwargs((s5/usr/lib/python2.7/site-packages/kitchen/text/utf8.pytutf8_text_fills cGs8tjtdtddt|tdj|S(sx**Deprecated** Convert the arguments to unicode and use :func:`kitchen.text.display._textual_width_le` instead. sckitchen.text.utf8._utf8_width_le is deprecated. Use kitchen.text.display._textual_width_le insteadR iR(R R RR RRtjoin(RR$((s5/usr/lib/python2.7/site-packages/kitchen/text/utf8.pyt_utf8_width_les R&R#RRRR(sutf8_text_fillsutf8_text_wraps utf8_valids utf8_widthsutf8_width_chopsutf8_width_fill(t__doc__R tkitchenRtkitchen.text.convertersRRtkitchen.text.miscRtkitchen.text.displayRRRRRR RRRRtTrueRR#R&R(t__all__(((s5/usr/lib/python2.7/site-packages/kitchen/text/utf8.pyt2s .