Flowdock
Ruby on Rails latest stable (v4.2.7) - 0 notes - Superclass: Object

Class deprecated or moved

This class is deprecated or moved on the latest stable version. The last existing version (v2.1.0) is shown here.

UTF8Handler implements Unicode aware operations for strings, these operations will be used by the Chars proxy when $KCODE is set to ‘UTF8’.

Aliases

  • size
  • slice

Constants

HANGUL_SBASE = 0xAC00

HANGUL_LBASE = 0x1100

HANGUL_VBASE = 0x1161

HANGUL_TBASE = 0x11A7

HANGUL_LCOUNT = 19

HANGUL_VCOUNT = 21

HANGUL_TCOUNT = 28

HANGUL_NCOUNT = HANGUL_VCOUNT * HANGUL_TCOUNT

HANGUL_SCOUNT = 11172

HANGUL_SLAST = HANGUL_SBASE + HANGUL_SCOUNT

HANGUL_JAMO_FIRST = 0x1100

HANGUL_JAMO_LAST = 0x11FF

UNICODE_WHITESPACE = [ (0x0009..0x000D).to_a, # White_Space # Cc [5] .. 0x0020, # White_Space # Zs SPACE 0x0085, # White_Space # Cc 0x00A0, # White_Space # Zs NO-BREAK SPACE 0x1680, # White_Space # Zs OGHAM SPACE MARK 0x180E, # White_Space # Zs MONGOLIAN VOWEL SEPARATOR (0x2000..0x200A).to_a, # White_Space # Zs [11] EN QUAD..HAIR SPACE 0x2028, # White_Space # Zl LINE SEPARATOR 0x2029, # White_Space # Zp PARAGRAPH SEPARATOR 0x202F, # White_Space # Zs NARROW NO-BREAK SPACE 0x205F, # White_Space # Zs MEDIUM MATHEMATICAL SPACE 0x3000, # White_Space # Zs IDEOGRAPHIC SPACE ].flatten.freeze

UNICODE_LEADERS_AND_TRAILERS = UNICODE_WHITESPACE + [65279]

UTF8_PAT = /\A(?: [\x00-\x7f] | [\xc2-\xdf] [\x80-\xbf] | \xe0 [\xa0-\xbf] [\x80-\xbf] | [\xe1-\xef] [\x80-\xbf] [\x80-\xbf] | \xf0 [\x90-\xbf] [\x80-\xbf] [\x80-\xbf] | [\xf1-\xf3] [\x80-\xbf] [\x80-\xbf] [\x80-\xbf] | \xf4 [\x80-\x8f] [\x80-\xbf] [\x80-\xbf] )*\z/xn

UNICODE_TRAILERS_PAT = /(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+\Z/

UNICODE_LEADERS_PAT = /\A(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+/

UCD = UnicodeDatabase.new

Attributes

Show files where this class is defined (1 file)
Register or log in to add new notes.