$KCODE Demo : KCODE « Development « Ruby






$KCODE Demo


#!/usr/bin/env ruby

p $KCODE
eacute = ''
eacute << 0303 << 0251
p eacute

$KCODE = 'u'
p $KCODE
p eacute

 








Related examples in the same category

1.Setting the $KCODE global variable to 'u' and loading jcode gives regular expressions awareness of UTF-8 characters
2.Using jcode you can make regular expressions UTF-8 aware
3.$KCODE = 'u'
4.Handling International Encodings
5.Check string size for non ascii code
6.Count non-ascii string
7.Length of non-ascii string