Terminal control/Unicode output: Difference between revisions
Content added Content deleted
(added Nemerle) |
|||
Line 80: | Line 80: | ||
<lang Mathematica>If[StringMatchQ[$CharacterEncoding, "UTF*"], Print[FromCharacterCode[30000]], Print["UTF-8 capable terminal required"]] |
<lang Mathematica>If[StringMatchQ[$CharacterEncoding, "UTF*"], Print[FromCharacterCode[30000]], Print["UTF-8 capable terminal required"]] |
||
->田</lang> |
->田</lang> |
||
=={{header|Nemerle}}== |
|||
Typically, on a windows system, the output encoding is '''not''' UTF-8, so in an actual application it would make more sense to set <tt>Console.OutputEncoding</tt> than to merely check it. |
|||
<lang Nemerle>using System.Console; |
|||
module UnicodeOut |
|||
{ |
|||
Main() : void |
|||
{ |
|||
if (OutputEncoding.ToString() == "System.Text.UTF8Encoding") Write("Δ") |
|||
else Write("Console encoding may not support Unicode characters."); |
|||
} |
|||
}</lang> |
|||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
<lang perl6>die "Terminal can't handle UTF-8" |
<lang perl6>die "Terminal can't handle UTF-8" |