Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Individual char values in a Unicode string
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 6th October 08:20
paul lutus
External User
 
Posts: 1
Default Individual char values in a Unicode string



Hex numbers are numbers.

To answer your question, you can extract bytes from a string:

#!/usr/bin/ruby

s = "this is a test"

i = 0
while (i < s.size)
puts s[i] # emits numbers, not characters
i += 1
end

Bu I don't think Ruby recognizes characters, Unicode or otherwise. So it may
not be able to interpret a mixture of Unicode and UTF/8 without explicit
code from the programmer.

--
Paul Lutus
http://www.arachnoid.com
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666