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.

/* Terminal Control/Unicode, in Jsish */
 
var utf = false;
for (var envar of ['LC_ALL', 'LC_CTYPE', 'LANG']) {
    var val = Util.getenv(envar);
    if (val && (val.search(/utf/i) > 0)) {
        utf = true;
        break;
    }
}
 
puts((utf) ? '\u25b3' : 'Unicode support not detected');
 
/*
=!EXPECTSTART!=
△
=!EXPECTEND!=
*/