The task is to check that the terminal supports Unicode output, before outputting a Unicode character. If the terminal supports Unicode, then the terminal should output a Unicode delta (U+25b3). If the terminal does not support Unicode, then an appropriate error should be raised.

Note that it is permissible to use system configuration data to determine terminal capabilities if the system provides such a facility.

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