I am maintaining a text editor which uses QTextDocument. I have noticed that when a file contains non-breaking spaces, they are converted to normal spaces on saving.
It looks like that happens in QTextDocument::toPlainText method. However that is not mentioned in the documentation, there is no comment about it in the source code, and git blame does not help because it traces to the initial commit in the Qt 4 repository.
My question is: is this replacing still needed? And if yes, why?
Can we have some API for getting the original text without replacing?