Skip to content

Add plain report output - #35

Merged
lusingander merged 6 commits into
masterfrom
plain-output
Oct 31, 2026
Merged

lusingander merged 6 commits into
masterfrom
plain-output

Conversation

@lusingander

Copy link
Copy Markdown
Owner
$ sauva -o plain U+00BD

Identity
  Character: "\u00BD"
  Code Point: U+00BD
  Primary Name: VULGAR FRACTION ONE HALF
  Plane: 0 — Basic Multilingual Plane
  Block: Latin-1 Supplement

Classification
  General Category: No — Other Number
  Script: Common
  Age: 1.1
  East Asian Width: A — Ambiguous
  Bidi Class: ON — Other Neutral

Numeric
  Numeric Type: Numeric
  Numeric Value: 1/2

Encoding
  UTF-8: C2 BD
  UTF-16: 00BD
  HTML Decimal: ½
  HTML Hex: ½
  Rust char: '\u{BD}'
  Unicode Escape: \u00BD

Normalization
  Decomposition Type: Compatibility — fraction
  Decomposition:
    U+0031 DIGIT ONE
    U+2044 FRACTION SLASH
    U+0032 DIGIT TWO

Data
  Unicode Version: 17.0.0

Text Analysis
  CP: 1  UTF-8 Bytes: 2  UTF-16 Units: 1  GC: 1

Normalization Forms
  Form  State      CP  UTF-8 Bytes  UTF-16 Units  GC  Result
  NFC   unchanged  1   2            1             1   "\u00BD"
  NFD   unchanged  1   2            1             1   "\u00BD"
  NFKC  changed    3   5            3             3   "1\u20442"
  NFKD  changed    3   5            3             3   "1\u20442"

$ sauva -o plain --text 'Á😀'

Input: "A\u0301\uD83D\uDE00"
CP: 3  UTF-8 Bytes: 7  UTF-16 Units: 4  GC: 2

Positions: CP# / GC# are 1-based; byte / unit ranges are 0-based, end-exclusive.
CP#  GC#  Code Point  UTF-8 Bytes  UTF-16 Units  Name
1    1    U+0041      [0,1)        [0,1)         LATIN CAPITAL LETTER A
2    1    U+0301      [1,3)        [1,2)         COMBINING ACUTE ACCENT
3    2    U+1F600     [3,7)        [2,4)         GRINNING FACE

Normalization Forms
  Form  State      CP  UTF-8 Bytes  UTF-16 Units  GC  Result
  NFC   changed    2   6            3             2   "\u00C1\uD83D\uDE00"
  NFD   unchanged  3   7            4             2   "A\u0301\uD83D\uDE00"
  NFKC  changed    2   6            3             2   "\u00C1\uD83D\uDE00"
  NFKD  unchanged  3   7            4             2   "A\u0301\uD83D\uDE00"

Unicode Version: 17.0.0

@lusingander
lusingander merged commit abf9589 into master Oct 31, 2026
16 checks passed
@lusingander
lusingander deleted the plain-output branch October 31, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant