From: george_vrettos@... Date: 2016-03-20T21:18:32+00:00 Subject: [ruby-core:74478] [Ruby trunk Bug#12204] Invalid range of capital letters at Greek alphabet Issue #12204 has been reported by George Vrettos. ---------------------------------------- Bug #12204: Invalid range of capital letters at Greek alphabet https://bugs.ruby-lang.org/issues/12204 * Author: George Vrettos * Status: Open * Priority: Normal * Assignee: * ruby -v: 2.3.0 * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- Greek alphabet's first and last letter is: * �� - �� (lower case) * �� - �� (upper case) So if we write on a ruby console the following script, we get: ~~~ ('��'..'��').to_a => ["��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��"] ~~~ **which is correct**, we get all **24 lower case characters** of the greek alphabet, and a "special one", the letter "��" which HAS NO EQUIVALENT uppercase letter. TOTAL: 25 characters Now if we try to run the above script with upper case characters... ~~~ ('��'..'��').to_a => ["��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��"] ~~~ **we only get 17 characters**. The rest 7 upper case characters are missing! Those are (["��", "��", "��", "��", "��", "��", "��"]) Now if we try to "construct" the greek alphabet by using the UTF-8 equivalent number of its chatacter, we get the following: ~~~ (913..937).map { |char| char.chr('UTF-8') } => ["��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "\u03A2", "��", "��", "��", "��", "��", "��", "��"] ~~~ Note the invalid character **"\u03A2"** between letters "��" and "��". I believe that the problem is the letter "��" (greek sigma) which **has no upper case equivalent**. Ruby throws an exception at this point and never returns the rest of the characters. [[http://www.fileformat.info/info/unicode/char/03a2/index.htm]] -- https://bugs.ruby-lang.org/ Unsubscribe: