Terminal control/Unicode output: Difference between revisions

Added Seed7 example
No edit summary
(Added Seed7 example)
Line 495:
{{libheader|Scala}}<lang Scala>scala> println(s"Unicode is supported on this terminal and U+25B3 is : \u25b3")
Unicode is supported on this terminal and U+25B3 is : △</lang>
 
=={{header|Seed7}}==
The Seed7 library [http://seed7.sourceforge.net/libraries/console.htm console.s7i] defines
[http://seed7.sourceforge.net/libraries/console.htm#STD_CONSOLE STD_CONSOLE], which can used directly,
or be assigned to [http://seed7.sourceforge.net/libraries/stdio.htm#OUT OUT] (which is the default
output file). STD_CONSOLE supports Unicode under Linux and Windows.
 
<lang seed7>$ include "seed7_05.s7i";
include "environment.s7i";
include "console.s7i";
 
const proc: main is func
begin
if pos(lower(getenv("LANG")), "utf") <> 0 or
pos(lower(getenv("LC_ALL")), "utf") <> 0 or
pos(lower(getenv("LC_CTYPE")), "utf") <> 0 then
writeln(STD_CONSOLE, "Unicode is supported on this terminal and U+25B3 is: △");
else
writeln("Unicode is not supported on this terminal.");
end if;
end func;</lang>
 
=={{header|Sidef}}==