Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2016, 12:35 PM   #1
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
visibility of soft-hyphens

I was editing and informed about a incorrectly spelled word (curly underline). However, it looked ok. Changing it via the suggested word (which seems to be exactly the same word) did removed the curly underline, so something was replaced somehow. I inspected the original word letter by letter and noticed that there was an invisible soft-hyphen placed between two letters.

It would be nice to have that soft-hyphen made visible, but apparently there is no editor setting to do so. Changing colorschemas does not help.
So, is it even possible to show them? In the current situation you must explicitly search for them to find them. A visible indication would be nice.
DrChiper is offline   Reply With Quote
Old 06-08-2016, 06:38 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,630
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I use Tools->Reports->Characters to determine if any 'interesting' characters exist. I can then step though through the relevant code char-by-char watching the bottom left corner - I prefer not to delete/replace them en-masse.

Sigil has a plugin to help deal with Shady Characters. Perhaps DiapDealer could package it as a calibre editor plugin, as he has with his Toolbag plugin.

I too couldn't find a way of highlighting 'invisible characters' via colour scheme. Would be nice to have a toggle to show 'invisible characters' as a user configured character/colour, eg .

BR

Last edited by BetterRed; 06-08-2016 at 06:45 PM.
BetterRed is online now   Reply With Quote
Advert
Old 06-08-2016, 08:30 PM   #3
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Since I discovered the Hyphenate PI, I changed my workflow

I've starting running a stored F&R to remove any soft hyphens until I'm done editing, etc.

Then I use the PI to put them back, polish, etc. and convert the epub to azw3 format.
phossler is offline   Reply With Quote
Old 06-08-2016, 11:00 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is no way to show invisible characters that take no space in the underlying Qt widget. Your best bet is to simply run a search replace to replace all instances of such characters with something visible, like one of the unicode block characters.
kovidgoyal is online now   Reply With Quote
Old 06-09-2016, 08:24 AM   #5
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
There is no way to show invisible characters that take no space in the underlying Qt widget. Your best bet is to simply run a search replace to replace all instances of such characters with something visible, like one of the unicode block characters.
Since the soft hyphens cause a word to be listed as mis-spelt -- generating a lot more review effort -- replacing with another character would most likely also

FWIW, that's why I decided to just delete the soft hyphens until the very end
phossler is offline   Reply With Quote
Advert
Old 06-09-2016, 01:52 PM   #6
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Or perhaps let the dictionary ignore just any soft-hyphens, which might also do the trick. Normally, you would not notice the soft-hyphens, but the dictionary check revealed them as being (part of) misspelled words, which is not actually true. Soft-hyphens are just "hints" for any viewer to "break" words according some spelling rules.

Last edited by DrChiper; 06-09-2016 at 01:54 PM.
DrChiper is offline   Reply With Quote
Old 06-09-2016, 02:10 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There are over a dozen invisible characters not just soft-hyphens. zero-width spaces, various special chars in various scripts, etc. And just special casing all of them int he spell checking code is not the answer -- they will still cause problems in many other places, such as search and replace.
kovidgoyal is online now   Reply With Quote
Old 07-05-2016, 06:16 AM   #8
quiris
Groupie
quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'quiris understands when you whisper 'The dog barks at midnight.'
 
quiris's Avatar
 
Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
RFC 2070 - Internationalization of the Hypertext Markup Language on this matter: http://www.faqs.org/rfcs/rfc2070.html

Quote:
NOTE - the soft hyphen character (U+00AD) needs special attention from user-agent implementers. It is present in many character sets (including the whole ISO 8859 series and, of course, ISO 10646), and can always be included by means of the reference ­. Its semantics are different from the plain hyphen: it indicates a point in a word where a line break is allowed. If the line is indeed broken there, a hyphen must be displayed at the end of the first line. If not, the character is not displayed at all. In operations like searching and sorting, it must always be ignored.
And also HTML 4.01: http://www.w3.org/TR/html4/struct/text.html#h-9.3.3

Quote:
In HTML, there are two types of hyphens: the plain hyphen and the soft hyphen. The plain hyphen should be interpreted by a user agent as just another character. The soft hyphen tells the user agent where a line break can occur.

Those browsers that interpret soft hyphens must observe the following semantics: If a line is broken at a soft hyphen, a hyphen character must be displayed at the end of the first line. If a line is not broken at a soft hyphen, the user agent must not display a hyphen character. For operations such as searching and sorting, the soft hyphen should always be ignored.
quiris is offline   Reply With Quote
Old 07-19-2016, 08:59 AM   #9
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
I also use a regex function that turns chars into entities, which is probably the best way to make dodgy chars visible in a sensible way; see https://www.mobileread.com/forums/sho...d.php?t=270821
Phssthpok is offline   Reply With Quote
Old 09-02-2016, 05:27 PM   #10
marvin_2
Member
marvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura aboutmarvin_2 has a spectacular aura about
 
Posts: 24
Karma: 4472
Join Date: Jan 2011
Device: Kindle
The hyphenate-plugin can remove and add soft-hyphens. It uses OpenOffice dictionaries, I use it regularly and have yet to find the first error.
marvin_2 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre remove soft hyphens? zuli Calibre 3 11-08-2017 09:20 PM
Soft hyphens on Windows Styx Calibre 4 02-13-2015 04:26 AM
Removing Soft hyphens phossler Sigil 8 07-26-2013 03:52 PM
Soft Hyphens wallcraft Workshop 29 06-12-2012 04:21 AM
Feature request: soft hyphens paulpeer Sigil 3 12-05-2009 01:43 PM


All times are GMT -4. The time now is 04:35 AM.


MobileRead.com is a privately owned, operated and funded community.