@jackie_w: You are correct, Qt's toPlainText() function replaces \xa0 with a normal space, causing the non breaking spaces to be stripped out during save. I have fixed that by replacing toPlainText() with my own implementation.
https://github.com/kovidgoyal/calibr...78c463c5b4c956