copilot-swe-agent[bot] 95fa8f2ada
Modify ICU break iterator API to support extra word-break characters
- Add optional extra_word_break_chars field (sorted UChar32[]) to
  icu_BreakIterator struct, stored as a sorted array for efficient lookup
- icu_BreakIterator_new accepts optional 3rd argument (Python str) that is
  parsed into a sorted UChar32[] via insertion sort; only applies to UBRK_WORD
- icu_BreakIterator_dealloc frees the extra chars array
- New find_extra_word_break() inline helper scans a UTF-16 segment for the
  first matching extra-break codepoint using U16_NEXT + linear search
- BreakIterState gains extra_break_active/seg_start/seg_end sub-segmentation
  state fields (zero-initialized by memset in break_iter_state_init)
- break_iter_state_next refactored from while loop to for(;;) to drain
  sub-segments before fetching more ICU data; extra break within an ICU word
  segment causes the piece before it to flow through normal hyphen-joining
  logic while the tail is deferred; trailing-hyphen detection on sub-segments
  enables hyphen-joining with subsequent ICU segments
- Fast path: num_extra_word_break_chars == 0 → single comparison, zero overhead
- Tests added covering: letter extra break char, count_words/split2, adjacent
  breaks, multiple chars, None arg, surrogate-pair extra break char

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/c003ae42-1e56-4dbb-9ef2-9f1645b76c70
2026-03-26 05:56:33 +05:30
2026-02-21 15:53:39 +05:30
...
2025-03-11 15:19:51 +05:30
2026-03-24 18:58:35 +05:30
2026-03-24 21:22:30 +05:30
2026-03-24 21:30:17 +05:30
2026-03-25 20:21:50 +05:30
2024-11-24 22:01:57 +05:30
2025-03-21 08:09:41 +05:30
2026-03-13 08:14:05 +05:30
2025-03-25 09:30:01 +01:00
2021-01-24 19:53:30 +09:00
2021-01-24 19:53:30 +09:00
2026-03-03 14:23:37 +05:30
2025-10-10 08:24:39 +02:00
2025-05-09 19:10:59 +05:30

calibre

calibre is an e-book manager. It can view, convert, edit and catalog e-books in all of the major e-book formats. It can also talk to e-book reader devices. It can go out to the internet and fetch metadata for your books. It can download newspapers and convert them into e-books for convenient reading. It is cross platform, running on Linux, Windows and macOS.

For more information, see the calibre About page.

Build Status

Screenshots

Screenshots page

Usage

See the User Manual.

Development

Setting up a development environment for calibre.

A tarball of the source code for the current calibre release.

Bugs

Bug reports and feature requests should be made in the calibre bug tracker at Launchpad. GitHub is only used for code hosting and pull requests.

Support calibre

calibre is a result of the efforts of many volunteers from all over the world. If you find it useful, please consider contributing to support its development. Donate to support calibre development.

Building calibre binaries

See Build instructions for instructions on how to build the calibre binaries and installers for all the platforms calibre supports.

calibre package versions in various repositories

Packaging Status

Description
The official source code repository for the calibre ebook manager
Readme GPL-3.0 342 MiB
Languages
Python 92.5%
C++ 3.3%
C 3.1%
HTML 0.4%
Shell 0.2%
Other 0.2%