Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Korean language and computers
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Hangul Syllables block === Pre-composed Hangul syllables in the Unicode [[Hangul Syllables]] block are algorithmically defined with the following formula: : [(initial) Γ 588 + (medial) Γ 28 + (final)] + 44032 * Initial consonants {{columns-list|colwidth=8em|{{ordered list|start=0 | [[wikt:γ±|γ±]] | [[wikt:γ²|γ²]] | [[wikt:γ΄|γ΄]] | [[wikt:γ·|γ·]] | [[wikt:γΈ|γΈ]] | [[wikt:γΉ|γΉ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] }}}} * Medial vowels {{columns-list|colwidth=8em|{{ordered list|start=0 | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ ‘|γ ‘]] | [[wikt:γ ’|γ ’]] | [[wikt:γ £|γ £]] }}}} * Final consonants {{columns-list|colwidth=8em|{{ordered list|start=0 | ''none'' | [[wikt:γ±|γ±]] | [[wikt:γ²|γ²]] | [[wikt:γ³|γ³]] | [[wikt:γ΄|γ΄]] | [[wikt:γ΅|γ΅]] | [[wikt:γΆ|γΆ]] | [[wikt:γ·|γ·]] | [[wikt:γΉ|γΉ]] | [[wikt:γΊ|γΊ]] | [[wikt:γ»|γ»]] | [[wikt:γΌ|γΌ]] | [[wikt:γ½|γ½]] | [[wikt:γΎ|γΎ]] | [[wikt:γΏ|γΏ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] | [[wikt:γ |γ ]] }}}} To find the code point of "ν" in Unicode: * The value of the initial consonant (γ ) is 18. * The value of the medial vowel (γ ) is 0. * The value of the final consonant (γ΄) is 4. Substituting these values in the formula above yields [(18 Γ 588) + (0 Γ 28) + 4] + 44032 = 54620. The Unicode value of ν is 54620 in decimal, <code>&#54620;</code> in [[numeric character reference]], and U+D55C in hexadecimal Unicode notation. ==== How to code this in Rust ==== {{Irrelevant}} With the below module, calling e.g. <syntaxhighlight lang="rs" inline>hangul::from_jamo('γ ', 'γ ', Some('γ΄'))</syntaxhighlight> will return <syntaxhighlight lang="rs" inline>Some('ν')</syntaxhighlight>. <syntaxhighlight lang="rs"> mod hangul { const INITIAL_JAMO: [char; 19] = [ 'γ±', 'γ²', 'γ΄', 'γ·', 'γΈ', 'γΉ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', ]; const VOWEL_JAMO: [char; 21] = [ 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ', 'γ ‘', 'γ ’', 'γ £', ]; const FINAL_JAMO: [Option<char>; 28] = [ None, Some('γ±'), Some('γ²'), Some('γ³'), Some('γ΄'), Some('γ΅'), Some('γΆ'), Some('γ·'), Some('γΉ'), Some('γΊ'), Some('γ»'), Some('γΌ'), Some('γ½'), Some('γΎ'), Some('γΏ'), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), Some('γ '), ]; const GA_LOCATION: u32 = 'κ°' as u32; // = 44_032 pub fn from_jamo(initial: char, medial: char, last: Option<char>) -> Option<char> { if !( self::INITIAL_JAMO.contains(&initial) && self::VOWEL_JAMO.contains(&medial) && self::FINAL_JAMO.contains(&last) ) { return None; } char::from_u32( self::GA_LOCATION + 588 * (INITIAL_JAMO.iter().position(|&c| c == initial)? as u32) + 28 * (VOWEL_JAMO.iter().position(|&c| c == medial)? as u32) + FINAL_JAMO.iter().position(|&c| c == last)? as u32 ) } } </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)