On Tue, Mar 4, 2008 at 10:23 PM, yitzle <[EMAIL PROTECTED]> wrote: > On Tue, Mar 4, 2008 at 8:29 PM, Chas. Owens <[EMAIL PROTECTED]> wrote: > > Nope, due to addition of Unicode support in recent versions of Perl it > > will also match "\x{1814}" the Mongolian digit 4. The \d character > > class is not the same as [0-9], it matches all number characters, > > including those in other scripts. If you want to only > > 0,1,2,3,4,5,6,7,8,9 you need to say [0-9]. > > > > perl -le 'print "\x{1814}" =~ /\A\d+\z/ ? "t" : "f"' > > -- > > Chas. Owens > > More interesting, at least for me, would be > perl -le 'print "\x{1814}"' > What do I need to make that print out "properly"?
A terminal that can handle UTF-8. You may need to put this in your profile #fix UTF-8 support export LC_CTYPE=en_US.UTF-8 #vim needs this to swtich it from Latin1 to UTF-8 export PERL_UNICODE=SDL #Makes Perl use UTF-8 for IO You might also need the right fonts. Try this instead (I think CIRCLED DIGIT ONE is more commonly supported): perl -le 'print "\x{2460}"' -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/