-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Affects: io7m-com/.github#2
- Loading branch information
Showing
12 changed files
with
93 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
## 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 21 with no dependencies. | ||
* [OSGi-ready](https://www.osgi.org/) | ||
* [JPMS-ready](https://en.wikipedia.org/wiki/Java_Platform_Module_System) | ||
* 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
com.io7m.jeucreader.documentation/src/main/assembly/documentation.xml
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
...ucreader.documentation/src/main/java/com/io7m/jeucreader/documentation/Documentation.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...eucreader.documentation/src/main/java/com/io7m/jeucreader/documentation/package-info.java
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...m.jeucreader.documentation/src/main/resources/com/io7m/jeucreader/documentation/brand.xml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.