Parsing a hebrew website and maintaining the encoding to something readable

2005-07-05 Thread Lior Kesos
Hello Gog (Gang of Geeks), I'm writing a python script that is supposed to get some information off a hebrew website having this in it's headers... META HTTP-EQUIV=Content-Type content=text/html; charset=windows-1255 and style select{font-family:arial;font-size:13px}

Re: FC3 Question

2005-07-05 Thread Orr Dunkelman
thanks! -- Orr Dunkelman, [EMAIL PROTECTED] If it wasn't for C, we'd be writing programs in BASI, PASAL, and OBOL, anon Spammers: http://vipe.technion.ac.il/~orrd/spam.html GPG fingerprint: C2D5 C6D6 9A24 9A95 C5B3 2023 6CAB 4A7C B73F D0AA (This key will never sign Emails, only other PGP

Re: my new Palm Zire 72

2005-07-05 Thread Shlomo Solomon
On Tuesday 05 July 2005 02:31, Yedidyah Bar-David wrote: But, as I said, some are actually accessible from ttyUSB0 and some from ttyUSB1. I wanted to find out automatically which one, which wasn't easy (found no real info on google). So I simply tried, and at least for the first 3, I use the

Re: my new Palm Zire 72

2005-07-05 Thread Shlomo Solomon
On Tuesday 05 July 2005 02:31, Yedidyah Bar-David wrote: But, as I said, some are actually accessible from ttyUSB0 and some from ttyUSB1. I wanted to find out automatically which one, which wasn't easy (found no real info on google). So I simply tried, and at least for the first 3, I use the

Re: my new Palm Zire 72

2005-07-05 Thread Yedidyah Bar-David
On Tue, Jul 05, 2005 at 06:23:30PM +0300, Shlomo Solomon wrote: [snip] I still think it's strange that plugging in the USB cable causes the Kpilot icon to pop up, so something is, at least partly, set up properly. Not necessarily. Something is set up to respond to USB hotplug events. Maybe not

Re: Parsing a hebrew website and maintaining the encoding to something readable

2005-07-05 Thread Dvir Volk
I'm not a python expert, but you can use libiconv to convert the text to utf-8. I use it with C and PHP, it probably has pyhton bindings, and it also has a small app called iconv, which you can pipe to get what you need. if you're not sure what your source encoding will be in all cases, i'd

Re: Parsing a hebrew website and maintaining the encoding to something readable

2005-07-05 Thread Arik Baratz
On 05/07/05, Dvir Volk [EMAIL PROTECTED] wrote: I'm not a python expert, but you can use libiconv to convert the text to utf-8. I use it with C and PHP, it probably has pyhton bindings, and it also has a small app called iconv, which you can pipe to get what you need. if you're not sure what

Re: my new Palm Zire 72

2005-07-05 Thread Shlomo Solomon
On Tuesday 05 July 2005 19:52, Yedidyah Bar-David wrote: OK. Let's start from the very beginning. First, start from a clean known state. Either after a reboot, or try to For completely unrelated reasons, re-booting is not an option today. I hope I'll be able to do the tests you recommended in

Re: Parsing a hebrew website and maintaining the encoding to something readable

2005-07-05 Thread Lior Kesos
Pasted from the python-il list. - Thanks Viktorija (vika?) - that provided half of the solution. The full one is - unicode(text,'cp1255').encode('utf-8') Because the text is encoded in cp1255 it first needs to get decoded by that and encoded to utf8 regards Lior. Viktorija Zaksiene wrote: On

Re: Parsing a hebrew website and maintaining the encoding to something readable

2005-07-05 Thread Arik Baratz
On 05/07/05, Lior Kesos [EMAIL PROTECTED] wrote: Pasted from the python-il list. - Thanks Viktorija (vika?) - that provided half of the solution. The full one is - unicode(text,'cp1255').encode('utf-8') This one uses the unicode constructor to create the unicode object. I rather like