[Scribus] Bug in script with smart quote?

Chris Bergstresser chris
Fri Nov 16 22:12:50 CET 2007


Hi all --

   Can someone explain why this code snippet throws a "Selection Index
Out of Bounds" with a curly quote in the "This doesn't work", but
works with a straight quote (as in "This shouldn't work, but does")?

        scribus.selectText(0, 0, selected_frame)
        start_pos = len(scribus.getAllText(selected_frame))
        scribus.insertText("This doesn't work", -1, selected_frame)
        end_pos = len(scribus.getAllText(selected_frame))
        scribus.selectText(start_pos, end_pos - start_pos, selected_frame)

   I assumed it was an encoding issue, which is why I inserted the
text and then asked Scribus how long it was.  Didn't work.

-- Chris



More information about the scribus mailing list