[lug] [OT] Quick Python question
rm at fabula.de
rm at fabula.de
Thu Jun 6 08:56:58 MDT 2002
On Thu, Jun 06, 2002 at 10:43:46AM -0400, Hugh Brown wrote:
> On Thu, 2002-06-06 at 10:21, rm at fabula.de wrote:
> >
> > Given a file 'blub.data' holding Macintosh-encoded text data,
> > what is the most elegant way of reading it into a unicode string?
> >
> > Ralf Mattes
>
Thanks for the answer. Jep, there are a lot of nice Mac-Support apps
out ther (i usually use GNU recode, fantastic encoding support if you
ever need EBCDIC-Islandic ;-) Unfortunately, i need to read the data
from within a python extension (that calls another python extension of
mine that wants utf8) that walks through a whole week of newspaper articles
to inport them into a CMS. I'd like to avoid piping through external
apps if possible at all (i have a C app that converts the proprietary
export format which does the conversion using the GNU recode lib and
i'm happy to write my owm python wrapper that does the task but i
imagine there must be a python way to do it).
Ralf
> I have no experience with python but there is a package for redhat
> called macutils that has various programs for "manipulating files that
> are commonly used by Macintosh machines." e.g. binhex, frommac, hexbin,
> macsave, macstream, macunpack, tomac.
>
> One of those might be useful.
>
> FWIW,
>
> Hugh
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
More information about the LUG
mailing list