On Jan 20, 8:05 am, "Edward K. Ream" <[email protected]> wrote:
> This thread will discuss the unicode problems that likely were caused
> by the mass update at rev 2690.
Rev 2742 fixes several serious unicode problems, including the cut/
paste node reported today. Here is the checkin log:
QQQ
Fixed several unicode errors:
1. qtGui.py: onTextChanged now calls p.bodyString(). It is always
wrong to use v._bodyString outside of leoNodes.py.
2. qtGui.py: replaceClipboardWith calls g.toUnicode
(s,encoding='utf-8') This was omitted by mistake in rev 2686 of the
trunk.
3. qtGui.py: g.app.gui.toUnicode now forces the encoding to be
'utf-8'. This matches the old code, and is probably better than
relying on g.app.defaultEncoding.
4. leoFileCommands.py: createActualFile now creates binary (mode='wb')
output files, for both Python 2k. and Python 3k.
5. leoFileCommands.py: writeToFileHelper now calls:
if g.isPython3: s = bytes(s,self.leo_file_encoding,'replace')
just before calling theActualFileWrite. This is required to handle
unicode characters properly.
6. leoGlobals.py: changed g.pr to avoid crashing in Python 3k.
Fixes 1 and 2 above almost certainly fix the copy/paste node bug
reported today.
It remains to be seen whether other unicode problems remain.
QQQ
zpcspm's comments in another thread gives hope that these fixes will
suffice. However, I shall wait until next Friday (8 days) before
releasing rc1.
Furthermore, I'll keep reviewing diffs and making other enhancements
such as replacing references to v._bodyString and adding consistency
checks. I would like to kill this bug completely.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.