Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.ruby Subject: Re: Composite char Date: Thu, 19 Jul 2012 14:22:28 +0200 Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: individual.net amOsrY2ZUxP3C/3TKZwr9AA2mQQsfOZAt5V6rqtrC6hGxp79KcmGppLcKmBVZve00= Cancel-Lock: sha1:7VAJ5ojfJkSrZTHvae00MGmZik8= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: Xref: csiph.com comp.lang.ruby:6590 On 07/18/2012 07:06 PM, Manny Calavera wrote: > Hi, > there is a ruby gem to manipulate composite characters (0300-036f) like= > single char? What kind of manipulations do you have in mind? > I need something like this > s=3D"V=CC=85IX=CC=A3" # V with overline (U0305), I, X with dot below (U= 0323) > s.length #=3D> 3 > s[0] #=3D> 'V=CC=85' # V with overline (0305) > thanks, and sorry for my bad english What's wrong with irb(main):009:0> ["\u0305", "\u0323"].each {|s| puts s.length, s.bytesize= } 1 2 1 2 =3D> ["=CC=85", "=CC=A3"] Kind regards robert