diff --git a/CHANGELOG.md b/CHANGELOG.md index 91c6fd7b0..0a2f28057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,9 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co ### Removed - Remove "Custom hardware bitmap threshold" and "Custom display profile" advanced settings ([@wwww-wwww](https://github.com/wwww-wwww)) ([#3786](https://github.com/mihonapp/mihon/pull/3786)) +### Fixed +- Fixed refreshing chapters failing with the app language set to Arabic or another language with its own digits ([@AntsyLich](https://github.com/AntsyLich)) + ## [v0.21.0] - 2026-10-12 ### Added - Add `id:` prefix search to remaining trackers (AniList, Bangumi, Kitsu, MangaUpdates, Shikimori, and Hikka) ([@MajorTanya](https://github.com/MajorTanya), [@BrutuZ](https://github.com/BrutuZ)) ([#3776](https://github.com/mihonapp/mihon/pull/3776)) diff --git a/domain/src/main/java/tachiyomi/domain/chapter/service/ChapterRecognition.kt b/domain/src/main/java/tachiyomi/domain/chapter/service/ChapterRecognition.kt index 5d294f0dc..cca8e62f1 100644 --- a/domain/src/main/java/tachiyomi/domain/chapter/service/ChapterRecognition.kt +++ b/domain/src/main/java/tachiyomi/domain/chapter/service/ChapterRecognition.kt @@ -3,6 +3,7 @@ package tachiyomi.domain.chapter.service import tachiyomi.domain.chapter.model.Chapter import java.text.DecimalFormat import java.text.DecimalFormatSymbols +import java.util.Locale import kotlin.math.floor import kotlin.math.round @@ -77,9 +78,9 @@ object ChapterRecognition { private val prologue = Regex("""\b(?:prologue|one.?shot|pilot)\b""") /** - * Formats numbers without trailing zeros and with a dot whatever the locale, e.g. 10.5, 3, 24.005 + * Formats numbers without trailing zeros, with ASCII digits and a dot whatever the locale, e.g. 10.5, 3, 24.005 */ - private val formatter = DecimalFormat("#.###", DecimalFormatSymbols().apply { decimalSeparator = '.' }) + private val formatter = DecimalFormat("#.###", DecimalFormatSymbols(Locale.ROOT)) /** * The volume and chapter number recognized for a chapter, e.g. "10.5" or "19a", `null` when there is none.