Korean chapter parser does not recognize single-digit chapters "1화" through "9화"
What happened?
Korean manga chapter filenames with single-digit chapter numbers are being incorrectly classified as Specials.
This is not specific to one series. The same behavior occurs across all series in my library that use the same Korean single-digit chapter naming pattern (1화 through 9화).
For example, I have a series named:
Re제로부터 시작하는 이세계 생활
The files follow this naming format:
Re제로부터 시작하는 이세계 생활-1화.cbz Re제로부터 시작하는 이세계 생활-2화.cbz Re제로부터 시작하는 이세계 생활-3화.cbz ... Re제로부터 시작하는 이세계 생활-9화.cbz Re제로부터 시작하는 이세계 생활-10화.cbz Re제로부터 시작하는 이세계 생활-11화.cbz
In Kavita, Chapter 10 and above are correctly recognized as normal Chapters.
However, single-digit chapters such as:
Re제로부터 시작하는 이세계 생활-1화.cbz
are placed under the Specials tab instead.
The screenshots show that the Storyline/Chapter list starts at Chapter 10, while "Re제로부터 시작하는 이세계 생활-1화" appears under Specials.
The issue is reproducible with filenames such as:
Test Manga-1화.cbz Test Manga-2화.cbz Test Manga-9화.cbz Test Manga-10화.cbz
The current Korean chapter parser appears to use:
@"제?(?\d+.?\d+)(회|화|장)"
This pattern requires two digit groups (\d+ ... \d+). When no decimal point is present, a single-digit value such as "1" cannot satisfy both groups, while "10" can.
Therefore:
1화 -> not parsed as a chapter 9화 -> not parsed as a chapter 10화 -> parsed correctly
A pattern such as:
@"제?(?\d+(?:.\d+)?)(회|화|장)"
would appear to support both integer and decimal chapter numbers.
Screenshots
The normal chapter list starts at Chapter 10:
Chapter 1 is incorrectly classified under Specials:
What did you expect?
Korean chapter filenames using "화" should be recognized as normal Chapters regardless of whether the chapter number has one digit or multiple digits.
Expected behavior:
1화 -> Chapter 1 2화 -> Chapter 2 9화 -> Chapter 9 10화 -> Chapter 10 5.1화 -> Chapter 5.1
Single-digit chapters should not be classified as Specials.
Kavita Version Number - If you don't see your version number listed, please update Kavita and see if your issue still persists.
0.9.1 - Stable
Are you accessing kavita through a reverse proxy? If yes, confirm that the issue persists with a direct connection
No
What operating system is Kavita being hosted from?
Docker (Other)
If the issue is being seen on Desktop, what OS are you running where you see the issue?
Windows
If the issue is being seen in the UI, what browsers are you seeing the problem on?
Chrome
If the issue is being seen on Mobile, what OS are you running where you see the issue?
None
If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?
No response
Relevant log output
Additional Notes
Library type: Manga File format: CBZ Container image: ghcr.io/kareadita/kavita:latest
This behavior is reproducible across multiple series in my library that use the same Korean single-digit chapter naming pattern.
This issue is not limited to the series shown in the screenshots.
It occurs across all series in my library that use Korean single-digit chapter filenames such as:
Series Name-1화.cbz Series Name-2화.cbz ... Series Name-9화.cbz
These files are classified as Specials, while files starting from 10화 are recognized as normal Chapters.
The series shown in the screenshots is only one example used to demonstrate the issue.
This appears related to previous Korean parser work in #4575 / PR #4610, but this is a different issue: single-digit Korean chapter numbers are not recognized as normal Chapters.
Source: Kareadita/Kavita