Jump to content

Terminal control/Unicode output: Difference between revisions

→‎{{header|Ruby}}: Added Ruby entry.
(→‎{{header|Ruby}}: Added Ruby entry.)
Line 130:
</lang>
 
=={{header|Ruby}}==
<lang ruby>#encoding: UTF-8 # superfluous in Ruby >1.9.3
 
if ENV.values_at("LC_ALL","LC_CTYPE","LANG").compact.first.include?("UTF-8")
puts "△"
else
raise "Terminal can't handle UTF-8"
end<lang>
=={{header|Tcl}}==
Tcl configures the standard output channel to use the system encoding by default. The system encoding is formally the encoding for use when communicating with the OS (e.g., for filenames) but is virtually always correlated with the default terminal encoding.
1,149

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.