Weird 'setText' problem!
Phil Thompson
phil at riverbankcomputing.com
Thu Apr 20 18:45:29 BST 2023
On 18/04/2023 21:51, Matic Kukovec wrote:
> Hi,
>
> My specs:
>
> * Windows 10 x64
> * Python 3.10.4
> * PyQt 6.4.2
> * QScintilla 2.13.4
>
> In the attached example 'qscintilla_settext_problem.py', the text of
> 'test.js' is read into a QScintilla instance. Running it in a console
> prints:
>
> 10438 -> line 20, text read from the file >
> print(len(text.split('\n')))
> 1403 -> line 21, text read back from the QScintilla instance >
> print(len(editor.text().split('\n')))
>
> but it should print 10438 in both cases. Which seems like QScintilla
> is chopping off part of the text.
> The 'test.js' file was generated by the `emscripten` WASM compiler.
>
> Any ideas why? Is this a bug in QScintilla/Scintilla perhaps?
> There is a 'NUL' character on line 1403 that's causing this.
> Is there a way to fix this?
Should be fixed in the next snapshot.
I intend to make a new release next week so I'd appreciate as much
testing as possible.
Thanks,
Phil
More information about the QScintilla
mailing list