Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-18-2017, 07:01 AM   #1
cramoisi
Librarian
cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.
 
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
non-breaking space

Hello,

Is it normal that Koreader doesn't respect non breakable space before some signs ? (in french, we have NBSP before ? ! « and »). I love KR but really, i can't stand a ? or a ? alone at the beginning of the line.

I checked the epub, the nbsp sign was present in utf-8, I change it in html entities with no success (  and  ). Is it a known bug ? I didn't find anything about it...

Regards,
S
cramoisi is offline   Reply With Quote
Old 04-18-2017, 08:35 AM   #2
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
It's been discussed at the project on Github, I don't know if it was fixed or if anyone is working on the issue.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Advert
Old 04-18-2017, 09:50 AM   #3
cramoisi
Librarian
cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.
 
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
One "temporary solution" could be to remove them and glue ? ! etc to the words like in english. But I'm so accustomed to the french typography when i read french... Anyway, thanks for your answer, i will wait and not try any further.
Regards,
s
cramoisi is offline   Reply With Quote
Old 04-20-2017, 07:11 AM   #4
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
The only reference to non-breaking spaces I've been able to find is here: https://github.com/koreader/koreader...ment-273549019
Frenzie is offline   Reply With Quote
Old 04-21-2017, 02:19 AM   #5
cramoisi
Librarian
cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.
 
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
Dealing nbsp plagues my ereading since the first day haha
cramoisi is offline   Reply With Quote
Advert
Old 04-21-2017, 03:18 AM   #6
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

  (named entities) are considered to be a thing of the past. I have been using for some years without any problem their utf-8 equivalent, which is \u00a0 or (this is Sigil's choice) & # 1 6 0 ; without the spaces
I also use "fines insécables" (nnbsp) with their utf-8 value without problem, provided the embedded font recognizes this utf-8 character.

You can find one EPUB3 here which displays fine on Koreader and makes use of both.
https://www.mobileread.com/forums/sh...86&postcount=3

I can provide you regex to perform this change if need be.

Last edited by roger64; 04-21-2017 at 03:21 AM.
roger64 is offline   Reply With Quote
Old 04-21-2017, 04:31 AM   #7
cramoisi
Librarian
cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.
 
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
@roger64 : I said nbsp as a shortcut to non-breaking spaces (not for the html entity). I meant \u00a0 or & # 160 ; of course. All my tests with these and french ebooks show that koreader doesn't display them correctly.

I'll will try the epub you linked. I already check it with calibre and it says narrow-non-breaking space which is 8239 that could be the answer


Edit : i checked with different size and i've yet to see an error. Is koreader manage the narrow non-breaking space - 8239 - differently than the classic - 160 - one ? (all my previous tests were based on the classic one) which is the default one when ebooks are publish (it seems to me).


"I can provide you regex to perform this change if need be." => i would be sooo grateful !

Last edited by cramoisi; 04-21-2017 at 05:16 AM. Reason: tests
cramoisi is offline   Reply With Quote
Old 04-21-2017, 06:15 AM   #8
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Usually, I use nnbsp (fines insécables) because I use embedded fonts and later convert to six-inch PDF. I find them smarter. So I tend to convert most of nbsp to fines.

Of course, some nbsp equivalents are left, namely after "tirets de dialogue".

You'll find lower down the group of regex in .json format that I use with the Calibre editor. You can import all of them and execute them as a group. If you have any question, let me know.

The construction of each regex is very basic.
Attached Files
File Type: zip insecables.json.zip (808 Bytes, 278 views)
roger64 is offline   Reply With Quote
Old 04-21-2017, 06:47 AM   #9
cramoisi
Librarian
cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.
 
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
Quote:
Originally Posted by roger64 View Post
If you have any question, let me know.
I got the dummi-est question of all : how do I import the json in the calibre editor ?
cramoisi is offline   Reply With Quote
Old 04-21-2017, 08:39 AM   #10
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by cramoisi View Post
I got the dummi-est question of all : how do I import the json in the calibre editor ?
Menu de l'éditeur de Calibre: Rechercher/Recherches sauvegardées

Sur la petite fenêtre qui apparait, cliquer sur "Importer" et désigner le fichier insécables.json (préalablement décompressé)
roger64 is offline   Reply With Quote
Old 04-21-2017, 09:23 AM   #11
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by roger64 View Post
  (named entities) are considered to be a thing of the past.
By whom? There's a whole big list of named character references in the specification (which includes nbsp): https://www.w3.org/TR/html5/syntax.h...ter-references
Frenzie is offline   Reply With Quote
Old 04-21-2017, 09:41 AM   #12
cramoisi
Librarian
cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.cramoisi did not drink the Kool Aid.
 
Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
Quote:
Originally Posted by Frenzie View Post
By whom? There's a whole big list of named character references in the specification (which includes nbsp): https://www.w3.org/TR/html5/syntax.h...ter-references
yes. like & nbsp; the & shy is present ! (I hated these two ) in any way a reader should deal with & nbsp ; \u 00a0 and & # 160 in the same way, nope ? I tested with the three with no success.

Also, the reason people use less & nbsp is because it doesn't validate xhtml or XML in html5 for the only html entities you can have in a xml are & amp lt gt, quot and apos (but it's like my opinion )

Last edited by cramoisi; 04-21-2017 at 10:08 AM.
cramoisi is offline   Reply With Quote
Old 04-21-2017, 12:28 PM   #13
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by Frenzie View Post
By whom? There's a whole big list of named character references in the specification (which includes nbsp): https://www.w3.org/TR/html5/syntax.h...ter-references
EPUB3 does not make any use of named entities. I can't provide you with the official reference but I trust somebody will.

EPUB3 is supposed to be the replacement of EPUB2... The technical rationale comes from cramoisi.
roger64 is offline   Reply With Quote
Old 04-21-2017, 02:40 PM   #14
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by cramoisi View Post
Also, the reason people use less & nbsp is because it doesn't validate xhtml or XML in html5 for the only html entities you can have in a xml are & amp lt gt, quot and apos (but it's like my opinion )
It most definitely validates as XHTML since it's part of the DTD (see here). In XHTML5 they would be undefined by default due to the lack of a DTD (see here), but as far as valid XML goes you could just copy the old definitions if you wanted to use them. Something along these lines should to the trick.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY nbsp   "*"> <!-- no-break space = non-breaking space,
                                  U+00A0 ISOnum -->
]>
<html xmlns="http://www.w3.org/1999/xhtml">
NB I'm not saying a thing about EPUB.
Frenzie is offline   Reply With Quote
Old 04-21-2017, 03:24 PM   #15
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
My sentence was probably too short. I was referring about ebooks use (what else here?).

- Sigil gave up the use of nbsp as a named entity and replaces them systematically by & # 160 for EPUB3 books.
- The calibre editor disapproves the use of named entities and offers systematically to replace them by their utf-8 equivs for all EPUBs.
roger64 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-breaking space JSWolf ePub 38 06-09-2020 09:00 PM
Non breaking space (possible) bug rferran Sigil 3 12-02-2016 12:33 PM
Non-Breaking space drago87 Conversion 0 01-20-2016 05:52 AM
Why the non-breaking space? Notjohn Sigil 2 06-08-2015 05:24 AM
Non-breaking space (doubled) bug Camelot Sigil 49 02-13-2015 04:20 PM


All times are GMT -4. The time now is 11:16 AM.


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