Character codes: Difference between revisions

m
(Added an Algol W sample)
Line 530:
3 u: 7 u: 'abc☺'
97 98 99 9786</lang>
 
<code>7 u:</code> converts from utf-8, <code>3 u:</code> by itself would give us:
 
<lang j> 3 u: 'abc☺'
97 98 99 226 152 186</lang>
 
Also, if we limit ourselves to ascii, we have other ways of accomplishing the same thing. <code>a.</code> is a list of the 8 bit character codes and we can index from it, or search it (though that's mostly a notational convenience, since the underlying type already gives us all we need to know).
 
<lang j> 97 98 99{a.
abc
a.i.'abc'
97 98 99</lang>
 
=={{header|Java}}==
6,962

edits