Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] iconv / Python / unicode question



Jeez, Frank, surely you RFTMed first?  };^>

>>>>> "FB" == Frank Bennett <bennett@example.com> writes:

    FB> __any__ filter that will strip out these blocking characters

From the python-lib info manual (slightly edited):

   To simplify working with encoded files or stream, the module also
defines these utility functions:

`open(filename, mode[, encoding[, errors[, buffering]]])'
     Open an encoded file using the given MODE and return a wrapped
     version providing transparent encoding/decoding.

     _Note:_ The wrapped version will only accept the object format
     defined by the codecs, i.e. Unicode objects for most built-in
     codecs.  Output is also codec-dependent and will usually be
     Unicode as well.

     ENCODING specifies the encoding which is to be used for the the
     file.

     ERRORS may be given to define the error handling. It defaults to
     `'strict'' which causes a `ValueError' to be raised in case an
     encoding error occurs.

       Possible values for errors are `'strict'' (raise an exception in
       case of an encoding error), `'replace'' (replace malformed data
       with a suitable replacement marker, such as `?') and `'ignore''
       (ignore malformed data and continue without further notice).

     BUFFERING has the same meaning as for the built-in `open()'
     function.  It defaults to line buffered.



-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
              Don't ask how you can "do" free software business;
              ask what your business can "do for" free software.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links