Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,4 @@
if map( v -> System.getenv(v), ["LC_ALL", "LC_CTYPE", "LANG"]).filter( (!= null) ).exists( ('UTF' in) )
println( '\u25b3' )
else
println( 'Unicode not supported' )

View file

@ -0,0 +1,6 @@
local(env_vars = sys_environ -> join('###'))
if(#env_vars >> regexp(`(LANG|LC_ALL|LC_CTYPE).*?UTF.*?###`)) => {
stdout('UTF supported \u25b3')
else
stdout('This terminal does not support UTF')
}

View file

@ -0,0 +1,6 @@
import os, strutils
if "utf" in getEnv("LANG").toLower:
echo "Unicode is supported on this terminal and U+25B3 is: △"
else:
echo "Unicode is not supported on this terminal."

View file

@ -0,0 +1,5 @@
if (/\bUTF-?8/i ~~ [ENV{"LC_ALL","LC_CTYPE","LANG"}]) {
say "△"
} else {
die "Terminal can't handle UTF-8.\n";
}

View file

@ -0,0 +1,15 @@
def has_unicode_support:
def utf: if . == null then false else contains("UTF") or contains("utf") end;
env.LC_ALL
| if utf then true
elif . != null and . != "" then false
elif env.LC_CTYPE | utf then true
else env.LANG | utf
end ;
def task:
if has_unicode_support then "\u25b3"
else error("HW65001 This program requires a Unicode-compatible terminal")
end ;
task