Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Composite char

28 views
Skip to first unread message

Manny Calavera

unread,
Jul 18, 2012, 1:06:44 PM7/18/12
to
Hi,
there is a ruby gem to manipulate composite characters (0300-036f) like
single char?
I need something like this
s="V̅IX̣" # V with overline (U0305), I, X with dot below (U0323)
s.length #=> 3
s[0] #=> 'V̅' # V with overline (0305)
thanks, and sorry for my bad english

Robert Klemme

unread,
Jul 19, 2012, 8:22:28 AM7/19/12
to
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="V̅IX̣" # V with overline (U0305), I, X with dot below (U0323)
> s.length #=> 3
> s[0] #=> 'V̅' # 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
=> ["̅", "̣"]

Kind regards

robert

0 new messages