![]() |
#1 |
Librarian
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,466
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 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Librarian
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,741
Karma: 730681
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
|
![]() |
![]() |
![]() |
#5 |
Librarian
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
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. |
![]() |
![]() |
![]() |
#7 |
Librarian
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
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. |
![]() |
![]() |
![]() |
#9 |
Librarian
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
|
|
![]() |
![]() |
![]() |
#10 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
Sur la petite fenêtre qui apparait, cliquer sur "Importer" et désigner le fichier insécables.json (préalablement décompressé) |
|
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 | |
Librarian
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 346
Karma: 72225
Join Date: Apr 2015
Location: Liège - Belgium
Device: kobo gloHD - KA1
|
Quote:
![]() 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. |
|
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
EPUB3 is supposed to be the replacement of EPUB2... The technical rationale comes from cramoisi. |
|
![]() |
![]() |
![]() |
#14 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Quote:
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"> |
|
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |