@shadow fails w/ exceptions if you try to read a shadow node in a new (unsaved) leo file ...erroneously reports: TypeError: coercing to Unicode: need string or buffer, NoneType found
Save the leo file in _some_ name & all is well (may want to catch this). - Yarko On Jan 17, 4:39 pm, "Edward K. Ream" <[email protected]> wrote: > On Jan 17, 12:44 pm, "Edward K. Ream" <[email protected]> wrote: > > > Later today I hope to up an important cleanup to Leo's unicode > > handling. > > Done at rev 2690 of the trunk. Rev 2689 now bears the tag > "before_unicode_mass_update". > > Here is the checkin log for 2690: > > QQQ > A mass update revising and simplifying the use of encoding arguments. > > - g.toUnicode now uses g.app.defaultEncoding as the default. > > - Several methods, including c.setBodyString, leoImport.createOutline, > c.appendStringToBody, p.setBodyString (etc) no longer take any > encoding param. > > - qtGui.py now uses g.u almost exclusively. > > The result of all of this is that it is now easy to determine where > encoding really must be used, namely in read and import methods. > Just search for g.toUnicode(x) where x is non-empty. > > All unit tests pass, and pylint is happy, at least on this account. > > However, there is no guarantee that the code works in all > environments. Only time will tell. > QQQ > > Please report any unicode problems immediately. I definitely want to > keep the new code. > > 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.
