Displaying Hebrew charachters

Yosef Meller <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
Hi,

I've started adding support for my phone, and managed to get something 
preliminary working. I'm extracting data from the phonebook, but when it 
gets to display the actual records (after running Phone.getphonebook) I 
get an exception when displaying Hebrew (cp-1255 or iso-8859-8) 
charachters.

The data in colums that have only 0-127 charachter codes (such as my 
dummy group names) gets displayed properly.

So, I guess I need to tell it what encoding I'm using, but I could not 
find where to do so. Can anyone direct me?

My exception:

Traceback (most recent call last):
   File "/usr/lib/python2.3/site-packages/wx/_core.py", line 10604, in 
<lambda>
     lambda event: event.callable(*event.args, **event.kw) )
   File "/home/yosef/bitpim/guihelper.py", line 115, in _busywrapper
     return method(*args, **kwargs)
   File "/home/yosef/src/bitpim/phonebook.py", line 1641, in DoMerge
     self._DoMerge(progdlg)
   File "/home/yosef/src/bitpim/phonebook.py", line 1737, in _DoMerge
     self.table.OnDataUpdated()
   File "/home/yosef/bitpim/guihelper.py", line 115, in _busywrapper
     return method(*args, **kwargs)
   File "/home/yosef/src/bitpim/phonebook.py", line 1397, in OnDataUpdated
     self.main.OnCellSelect()
   File "/home/yosef/src/bitpim/phonebook.py", line 1782, in OnCellSelect
     self.resultpreview.ShowEntry(self.resultdata[resultid])
   File "/home/yosef/src/bitpim/phonebook.py", line 163, in ShowEntry
     self.SetPage(text)
   File "/home/yosef/bitpim/bphtml.py", line 77, in SetPage
     wx.html.HtmlWindow.SetPage(self,text)
   File "/usr/lib/python2.3/site-packages/wx/html.py", line 973, in SetPage
     return _html.HtmlWindow_SetPage(*args, **kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 
462: ordinal not in range(128)

And not to be only on the asking side, I'm attaching a Makefile I wrote 
to replace makepackets.sh. The advantage of it is that if you're only 
updating your own protocol, there's no need to remake all other 
protocols (not really an issue now, but I'm a forward thinker).

Thanks,
Yosef.

-- 
  Keep on rocking in a free world!
Makefile (text/plain, 536 B)
PYTHON=python
PACKET_FILES=p_audiovoxcdm8900.py p_brew.py p_lg.py p_lgtm520.py p_lgvx4400.py p_lgvx4500.py p_lgvx4600.py p_lgvx6000.py p_lgvx6100.py p_lgvx7000.py p_samsungscha650.py p_samsungscha670.py p_samsungspha620.py p_sanyo4900.py p_sanyo4920.py p_sanyo5300.py p_sanyo5400.py p_sanyo5500.py p_sanyo7200.py p_sanyo7300.py p_sanyo7400.py p_sanyo8100_bell.py p_sanyo8100.py p_sanyo8200.py p_sanyomedia.py p_sanyonewer.py p_sanyo.py p_sktt_imt2000.py 

packets: $(PACKET_FILES)

%.py: %.p
	@echo $<; $(PYTHON) protogen.py $< $@
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.