Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-18-2025, 06:22 AM   #1
brave171
Junior Member
brave171 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2025
Device: PW3
Hyphenation is not working properly

I've been seeing a lot of hyphens where they don't belong: They're not placed as according to the (German) hyphenation dictionary.
For instance, the word "Krankenzimmer" has a proper entry in the hyphenation dictionary as "Kran-ken-zim-mer", but is rendered as "Krankenz-immer" in text. This is also not an issue caused by the file; there are no soft hyphens.

Is there a way to fix this?

The used version is 2025.04 on a PW3.
brave171 is offline   Reply With Quote
Old 05-18-2025, 01:13 PM   #2
jonnyl
Zealot
jonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beautyjonnyl does all things with Zen-like beauty
 
Posts: 125
Karma: 32884
Join Date: Jan 2021
Device: Likebook Mars
Is your document language set to German? (Top menu, 2nd tab, Typography rules: German).

I tested your example and it worked fine (see attachment).
Attached Thumbnails
Click image for larger version

Name:	hyphenation.png
Views:	65
Size:	87.8 KB
ID:	215746  
jonnyl is offline   Reply With Quote
Old 05-18-2025, 02:01 PM   #3
brave171
Junior Member
brave171 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2025
Device: PW3
Yes, the document language is German. I can see that the hyphenation dictionary properly contains "Kran-ken-zim-mer", but somehow it is rendered falsely.

Attachments: This is how it renders for me. Also, "jüdis-chzartes" on this page is not hyphenated correctly too. As you can see, the hyphenation dictionary is not the issue, but something else.
Attached Thumbnails
Click image for larger version

Name:	Reader_Alexander_Solschenizyn_Archipel_Gulag,_Der.epub_p269_2025-05-18_121450.png
Views:	59
Size:	126.5 KB
ID:	215747   Click image for larger version

Name:	Reader_Alexander_Solschenizyn_Archipel_Gulag,_Der.epub_p269_2025-05-18_194916.png
Views:	47
Size:	81.9 KB
ID:	215748  
brave171 is offline   Reply With Quote
Old 05-18-2025, 04:14 PM   #4
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
While you think you answered the question "Is your document language set to German?" you missed the steps to verify the german typography rules are applied on the current document.

So please verify. If you still can reproduce on a German document where typography rules are set to german please say so and attach a sample document that showcases the issue.
pazos is offline   Reply With Quote
Old 05-19-2025, 03:08 AM   #5
brave171
Junior Member
brave171 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2025
Device: PW3
I did verify it's set to German, I just didn't bother sending a screenshot for this since it's a trivial task. But if it's needed, I attached another screenshot.

I couldn't find a hyphenation error in a short test text I made, but as said, it's not all words that are hyphenated incorrectly. I would share the document in the screenshot, but I'm afraid MobileRead forbids this, as the author died too recently.
Attached Thumbnails
Click image for larger version

Name:	Reader_Alexander_Solschenizyn_Archipel_Gulag,_Der.epub_p269_2025-05-19_082217.png
Views:	55
Size:	80.6 KB
ID:	215757  
brave171 is offline   Reply With Quote
Old 05-20-2025, 03:35 PM   #6
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by brave171 View Post
I did verify it's set to German, I just didn't bother sending a screenshot for this since it's a trivial task. But if it's needed, I attached another screenshot.

I couldn't find a hyphenation error in a short test text I made, but as said, it's not all words that are hyphenated incorrectly. I would share the document in the screenshot, but I'm afraid MobileRead forbids this, as the author died too recently.
No need for screenshots, we trust your words

Unfortunately without a test case there's nothing we can do (and scramble isn't an option to debug hyphenation).

The test case doesn't need to be the full document. Just the minimum chunk of html + css required to trigger the bug.

I'm not sure. If you cannot reproduce in any other document on your collection you might want to try to reproduce disabling "embedded style" and see if that, somehow, affects the issue.

In any case feel free to open a ticket on github. Poire-z is there and not here and he's probably the only one it could help if this issue ends deemed as a bug
pazos is offline   Reply With Quote
Old 05-23-2025, 12:46 PM   #7
brave171
Junior Member
brave171 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2025
Device: PW3
Alright, I found the issue. Even though the book metadata had the language set as German (thus setting the hyphenation rules to German), the html files actually contained the tag xml:lang="en". And because "Respect embedded language tags" was enabled by default, English hyphenation rules were applied. The properly hyphenated words just happened to have their hyphenation correctly guessed.

So, for anyone who has the same problem and finds this post: The easiest solution is just disabling [Typography Rules > Respect embedded language tags]. If you prefer having a properly formatted book or if the book contains multiple languages, you'll need to manually change the language tags in the files.
brave171 is offline   Reply With Quote
Old 07-01-2025, 03:50 AM   #8
oje
Junior Member
oje began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2023
Device: Koreader, Tolino
@brave171: Thanks man! I was having the same problem and was already 'improving' Koreader's Dutch hyphenation patterns ...
oje is offline   Reply With Quote
Old 07-01-2025, 05:16 AM   #9
Moonbase59
Zealot
Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.
 
Moonbase59's Avatar
 
Posts: 143
Karma: 196896
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
Don’t have a running KOReader here ATM, and not the book. But shouldn’t the HTML tags correctly indicate the document language, and thus make KOReader use the correct set of typo rules?

Looks like a problem in the ebook to me, possible?

Did a quick unpack and check of one of my ebooks, where it correctly shows "de-DE":

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de-DE">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="pandoc" />
  <title>ch001.xhtml</title>
  <link rel="stylesheet" type="text/css" href="../styles/stylesheet1.css" />
</head>

Last edited by Moonbase59; 07-01-2025 at 05:22 AM.
Moonbase59 is offline   Reply With Quote
Old 07-01-2025, 08:25 AM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,670
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Moonbase59 View Post
Don’t have a running KOReader here ATM, and not the book. But shouldn’t the HTML tags correctly indicate the document language, and thus make KOReader use the correct set of typo rules?

Looks like a problem in the ebook to me, possible?

Did a quick unpack and check of one of my ebooks, where it correctly shows "de-DE":

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de-DE">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="pandoc" />
  <title>ch001.xhtml</title>
  <link rel="stylesheet" type="text/css" href="../styles/stylesheet1.css" />
</head>
It could also be code in the CSS to turn off hyphenation.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyphenation not working on epub 2 red_scharlach ePub 10 11-04-2021 02:23 PM
SampleExportingApp Not Working Properly lsacher Plugins 5 09-23-2021 12:45 AM
Hyphenation not working with kepubs Anak Kobo Reader 9 08-12-2013 06:22 PM
Links not working properly? dokkeynot Sigil 1 06-27-2012 02:04 PM
Kindle for pc not working properly bodhran Amazon Kindle 4 09-18-2011 01:45 PM


All times are GMT -4. The time now is 06:13 AM.


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