Tuesday, May 5, 2015

Addendum to the above on Unicode: I use the degree sign (°). I have boilerplate to get all the Unicode...

Addendum to the above on Unicode: I use the degree sign (°). I have boilerplate to get all the Unicode goodness, but the one that allowed that character to display in my bash shell is "use utf8". The rest of the boilerplate? I'm actually not too sure of what it does. A bit of cargo-cult programming I'll have to work out.

You can use Unicode characters in your code, but it's turning out, not all of them. For example, this works just fine:

my $pi = 3.14159 ;
my $π = $pi ; 

But this doesn't.

my $° = qq{degree} ;

I'm not sure why some characters are allowed in code and some aren't.

No comments:

Post a Comment