Watch
2
0
Fork
You've already forked jeucreader
0
Unicode codepoint reader.
  • Java 99.5%
  • CSS 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-31 18:42:54 +01:00
.forgejo Update workflows. 2026-07-31 18:42:54 +01:00
com.io7m.jeucreader.core Begin next development iteration. 2024-05-10 14:42:56 +00:00
com.io7m.jeucreader.tests Begin next development iteration. 2024-05-10 14:42:56 +00:00
src/site/resources Update site metadata. 2025-08-09 15:06:03 +00:00
.gitignore Update .gitignore. 2024-05-07 16:01:43 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:45 +01:00
pom.xml Migrate project. 2026-06-27 09:22:30 +01:00
README-CHANGES.xml Mark release 3.0.1 2024-05-10 14:42:49 +00:00
README-LICENSE.txt Update LICENSE 2023-08-13 21:07:23 +00:00
README.in Migrate project. 2026-06-27 09:22:30 +01:00
README.md Migrate project. 2026-06-27 09:22:30 +01:00

jeucreader

Maven Central Maven Central (snapshot) Java Version

com.io7m.jeucreader

jeucreader

The jeucreader package provides an interface for reading Unicode codepoints one at a time.

Features

  • Unicode codepoint reader interface.
  • High coverage test suite.
  • Written in pure Java 17 with no dependencies.
  • OSGi-ready
  • JPMS-ready
  • ISC license.

Motivation

For some reason, Java does not expose any interface to read individual Unicode codepoints from any kind of I/O stream. It does provide methods to, for example, read text into a String and then iterate over the codepoints of the String.

The jeucreader package attempts to provide this missing functionality.

Usage

Given a java.io.Reader r, instantiate a UnicodeCharacterReaderType and use it to read individual codepoints:

Reader r;

try (var u = UnicodeCharacterReader.newReader(r)) {
  int c0 = u.readCodePoint();
  int c1 = u.readCodePoint();
  int c2 = u.readCodePoint();
  ...
}

On consuming malformed text, the reader may raise subtypes of IOException such as InvalidSurrogatePair, MissingLowSurrogate, OrphanLowSurrogate, and etc.