By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,396 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

question on charset conversion

P: n/a
Hi all there!

Would you mind answering a question to a Python newbie?:) Here it is: I
have to download a page with windows-1250 and parse it and convert it to
iso-8859-2. It there some easy way to acomplish this task using the
standard distribution built-in modules? Or do I have to get some extra?
Thanks,

Lukas Holcik

(I'm using Python-2.3.3 on Linux)
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Lukas Holcik wrote:
Would you mind answering a question to a Python newbie?:) Here it is: I
have to download a page with windows-1250 and parse it and convert it to
iso-8859-2. It there some easy way to acomplish this task using the
standard distribution built-in modules? Or do I have to get some extra?


iso8859_2_string = unicode(cp1250_string, 'cp1250').encode('iso-8859-2')

Mit freundlichen Gruessen,

Peter Maas

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail pe********@mplusr.de
-------------------------------------------------------------------
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.