unicode-data-0.4.0.1: Access Unicode Character Database (UCD)
Copyright(c) 2020 Composewell Technologies and Contributors
LicenseApache-2.0
Maintainerstreamly@composewell.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unicode.Char.Normalization

Description

Low level Unicode database functions to facilitate Unicode normalization.

For more information on Unicode normalization please refer to the following sections of the Unicode standard:

Synopsis

Combining class

isCombining :: Char -> Bool Source #

Returns True if a character is a combining character.

Since: 0.1.0

combiningClass :: Char -> Int Source #

Returns the combining class of a character.

Since: 0.1.0

isCombiningStarter :: Char -> Bool Source #

Return True if a starter character may combine with some preceding starter character.

Since: 0.1.0

Composition

compose :: Char -> Char -> Maybe Char Source #

Compose a starter character (combining class 0) with a combining character (non-zero combining class). Returns the composed character if the starter combines with the combining character, returns Nothing otherwise.

Since: 0.1.0

composeStarters :: Char -> Char -> Maybe Char Source #

Compose a starter character with another starter character. Returns the composed character if the two starters combine, returns Nothing otherwise.

Since: 0.1.0

Decomposition

Non-Hangul

data DecomposeMode Source #

Whether we are decomposing in canonical or compatibility mode.

Since: 0.1.0

Constructors

Canonical 
Kompat 

isDecomposable :: DecomposeMode -> Char -> Bool Source #

Given a non-Hangul character determine if the character is decomposable. Note that in case compatibility decompositions a character may decompose into a single compatibility character.

Since: 0.1.0

decompose :: DecomposeMode -> Char -> [Char] Source #

Decompose a non-Hangul character into its canonical or compatibility decompositions. Note that the resulting characters may further decompose.

Since: 0.1.0

Hangul

decomposeHangul :: Char -> (Char, Char, Char) Source #

Decompose a Hangul syllable into its corresponding Jamo characters.

Since: 0.1.0