View Single Post
Old 01-01-2014, 07:25 AM   #18
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,701
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by HarryT View Post
Why on Earth would anyone want to change the readable   into the meaningless #160? What's the benefit?
It wasn't really a case of "want." There's been lots of previous discussion about the reasons, Harry, but the short answer is that: quirks of Qt and the various Sigil libraries/features that require xhtml to remain well-formed at all times actually conspired to create invalid xhtml under certain conditions.

The benefit is that source documents that contain the unicode non-breaking-space character (which won't survive in the Qt editing widget) can be opened/imported without breaking the well-formed "rules" (which is what was happening when non-breaking-space characters were being converted to the nbsp entity in documents with no Document Type Declaration).

I agree it's probably not optimal, but without a major overhaul of Sigil's codebase/structure (which doesn't seem likely at this point), using #160 rather than nbsp was simply the quickest band-aid for a hairy problem.
DiapDealer is offline   Reply With Quote