robmcmullen / peppy

NO LONGER MAINTAINED
http://peppy.flipturn.org/
GNU General Public License v2.0
14 stars 7 forks source link

HexEdit fails to change edited values #425

Open robmcmullen opened 12 years ago

robmcmullen commented 12 years ago

[Trac time 20080415 194352Z] A consequence of using the STC as a backend store: when editing in the middle of a unicode string, updates will fail because SetSelection fails when the start or end point breaks a unicode string.

robmcmullen commented 12 years ago

[Trac time 20080805 160803Z] Maybe it could work if, upon entering HexEdit mode, the code page for the reference STC is changed so that it isn't unicode.

robmcmullen commented 12 years ago

[Trac time 20080805 165351Z] Well, when I do this:

self.buffer.stc.SetCodePage(0)

I get this error, so maybe it's not possible to change the code page?

  File "/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/stc.py", line 1730, in SetCodePage
    return _stc.StyledTextCtrl_SetCodePage(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "codePage == wxSTC_CP_UTF8" failed at
../../../../contrib/src/stc/stc.cpp(455) in SetCodePage():
Only wxSTC_CP_UTF8 may be used when wxUSE_UNICODE is on.
robmcmullen commented 12 years ago

[Trac time 20080417 002418Z] d9a29917cf8edb675c9362f511bad4af2125d060 Refs #425: attemped to find start and end of multi-byte sequence before replacing the value. Still doesn't work for all cases