Weird 'setText' problem!
Matic Kukovec
kukovecmatic at hotmail.com
Tue Apr 18 21:51:32 BST 2023
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?
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20230418/337f9621/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qscintilla_settext_problem.zip
Type: application/x-zip-compressed
Size: 96153 bytes
Desc: qscintilla_settext_problem.zip
URL: <https://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20230418/337f9621/attachment-0001.bin>
More information about the QScintilla
mailing list