Im new to smalltalk so im not sure how you derived the numbers. So if I have 000A as a unicode how do I do the transformation? I don’t know how you got 2r10101101 16rA
And what are base r and number in <base>r<number> ? Thanks again Mohammad -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Igor Stasenko Sent: Friday, March 15, 2013 12:54 PM To: A friendly place where any question about pharo is welcome Subject: Re: [Pharo-users] Unicode in Smalltalk On 15 March 2013 13:44, Mohammad Al Houssami (Alumni) <[email protected]> wrote: > Im not sure where you got the 16r0026 from. What I have is something > like this > U+0009 CHARACTER TABULATION (tab) > U+000A LINE FEED (LF) > U+000C FORM FEED (FF) > U+0020 SPACE > > Whats on the left is the unicode representation. In some cases there > is no actual character to compare to( so I cant compare to < > &....) What I > will have to do is to create a character with unicode value U+000A. > I have tried myCharacter:= 000A asCharacter. But it doesn't work. > > When I try to print myCharacter it gives an error because it doesn't > understand the A. > because 000A is not valid literal in smalltalk. it is actually understood by compiler as unary message: 0 A if you want to use hexadecimal integer litrals, you should use radix notation: <base>r<number> try: 2r10101101 16rA > Thanks > Mohammad -- Best regards, Igor Stasenko.
