Terminal control/Display an extended character: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
Line 8: Line 8:


=={{header|11l}}==
=={{header|11l}}==
<lang 11l>print(‘£’)</lang>
<syntaxhighlight lang="11l">print(‘£’)</syntaxhighlight>


=={{header|ACL2}}==
=={{header|ACL2}}==
<lang Lisp>(cw "£")</lang>
<syntaxhighlight lang="lisp">(cw "£")</syntaxhighlight>


=={{header|Action!}}==
=={{header|Action!}}==
<lang Action!>PROC Main()
<syntaxhighlight lang="action!">PROC Main()
BYTE CHBAS=$02F4 ;Character Base Register
BYTE CHBAS=$02F4 ;Character Base Register


Line 20: Line 20:
Position(2,2)
Position(2,2)
Put(8) ;print the GBP currency sign
Put(8) ;print the GBP currency sign
RETURN</lang>
RETURN</syntaxhighlight>
{{out}}
{{out}}
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Display_an_extended_character.png Screenshot from Atari 8-bit computer]
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Display_an_extended_character.png Screenshot from Atari 8-bit computer]
Line 29: Line 29:
=={{header|Ada}}==
=={{header|Ada}}==


<lang ada>with Ada.Text_IO; use Ada.Text_IO;
<syntaxhighlight lang="ada">with Ada.Text_IO; use Ada.Text_IO;
with Ada.Characters.Latin_1;
with Ada.Characters.Latin_1;


Line 35: Line 35:
begin
begin
Put(Ada.Characters.Latin_1.Pound_Sign);
Put(Ada.Characters.Latin_1.Pound_Sign);
end Pound;</lang>
end Pound;</syntaxhighlight>


Ada allows Unicode characters in the source, and provides output functions on "wide characters".
Ada allows Unicode characters in the source, and provides output functions on "wide characters".


<lang ada>with Ada.Wide_Text_IO; use Ada.Wide_Text_IO;
<syntaxhighlight lang="ada">with Ada.Wide_Text_IO; use Ada.Wide_Text_IO;


procedure Unicode is
procedure Unicode is
begin
begin
Put("札幌");
Put("札幌");
end Unicode;</lang>
end Unicode;</syntaxhighlight>


=={{header|Arturo}}==
=={{header|Arturo}}==


<lang rebol>print "£"</lang>
<syntaxhighlight lang="rebol">print "£"</syntaxhighlight>


{{out}}
{{out}}
Line 58: Line 58:
You can print a literal "£".
You can print a literal "£".


<lang awk>BEGIN { print "£" }</lang>
<syntaxhighlight lang="awk">BEGIN { print "£" }</syntaxhighlight>


You can print a "£" using the escape sequences that match the encoding of your terminal.
You can print a "£" using the escape sequences that match the encoding of your terminal.
Line 79: Line 79:
|}
|}


<lang awk>BEGIN { print "\302\243" } # if your terminal is utf-8</lang>
<syntaxhighlight lang="awk">BEGIN { print "\302\243" } # if your terminal is utf-8</syntaxhighlight>


=={{header|BaCon}}==
=={{header|BaCon}}==
<lang freebasic>' Display extended character, pound sterling
<syntaxhighlight lang="freebasic">' Display extended character, pound sterling
LET c$ = UTF8$(0xA3)
LET c$ = UTF8$(0xA3)
PRINT c$</lang>
PRINT c$</syntaxhighlight>


=={{header|BASIC}}==
=={{header|BASIC}}==
==={{header|Applesoft BASIC}}===
==={{header|Applesoft BASIC}}===
Poke the glyph onto the hi-res screen.
Poke the glyph onto the hi-res screen.
<lang basic>10 DATA 56,68,4,14,4,4,122,0
<syntaxhighlight lang="basic">10 DATA 56,68,4,14,4,4,122,0
20 HGR
20 HGR
30 FOR I = 8192 TO 16383 STEP 1024
30 FOR I = 8192 TO 16383 STEP 1024
40 READ B: POKE I,B: NEXT</lang>
40 READ B: POKE I,B: NEXT</syntaxhighlight>


==={{header|BASIC256}}===
==={{header|BASIC256}}===
<lang freebasic>print "£"
<syntaxhighlight lang="freebasic">print "£"


# or
# or


print chr(163)</lang>
print chr(163)</syntaxhighlight>




==={{header|IS-BASIC}}===
==={{header|IS-BASIC}}===
<lang IS-BASIC>PRINT "£"</lang>
<syntaxhighlight lang="is-basic">PRINT "£"</syntaxhighlight>


or
or


<lang IS-BASIC>PRINT CHR$(35)</lang>
<syntaxhighlight lang="is-basic">PRINT CHR$(35)</syntaxhighlight>




==={{header|QBasic}}===
==={{header|QBasic}}===
<lang qbasic>PRINT "£"
<syntaxhighlight lang="qbasic">PRINT "£"


' or
' or


PRINT CHR$(156)
PRINT CHR$(156)
END</lang>
END</syntaxhighlight>




==={{header|True BASIC}}===
==={{header|True BASIC}}===
<lang qbasic>PRINT "£"
<syntaxhighlight lang="qbasic">PRINT "£"


! or
! or


PRINT CHR$(163)
PRINT CHR$(163)
END</lang>
END</syntaxhighlight>




Line 131: Line 131:
The ZX Spectrum uses a modified ascii character set that has a uk pound sign at character number 96:
The ZX Spectrum uses a modified ascii character set that has a uk pound sign at character number 96:


<lang basic>10 PRINT CHR$(96);</lang>
<syntaxhighlight lang="basic">10 PRINT CHR$(96);</syntaxhighlight>


=={{header|BBC BASIC}}==
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
{{works with|BBC BASIC for Windows}}
You can print a literal £ if it is available in the default ANSI code page:
You can print a literal £ if it is available in the default ANSI code page:
<lang bbcbasic> PRINT "£"</lang>
<syntaxhighlight lang="bbcbasic"> PRINT "£"</syntaxhighlight>
But to be on the safe side you can do this:
But to be on the safe side you can do this:
<lang bbcbasic> VDU 23,22,640;512;8,16,16,128+8 : REM Enable UTF-8 mode
<syntaxhighlight lang="bbcbasic"> VDU 23,22,640;512;8,16,16,128+8 : REM Enable UTF-8 mode
PRINT CHR$(&C2) CHR$(&A3) : REM UTF-8 encoding for £</lang>
PRINT CHR$(&C2) CHR$(&A3) : REM UTF-8 encoding for £</syntaxhighlight>


=={{header|bc}}==
=={{header|bc}}==
You can print a literal "£".
You can print a literal "£".


<lang bc>"£
<syntaxhighlight lang="bc">"£
"
"
quit</lang>
quit</syntaxhighlight>


=={{header|beeswax}}==
=={{header|beeswax}}==
<lang beeswax>_4~9P.P.M}</lang>
<syntaxhighlight lang="beeswax">_4~9P.P.M}</syntaxhighlight>


=={{header|Befunge}}==
=={{header|Befunge}}==
Line 155: Line 155:


Example output of a pound character in Code page 437:
Example output of a pound character in Code page 437:
<lang befunge>"| "+,@</lang>
<syntaxhighlight lang="befunge">"| "+,@</syntaxhighlight>


Example output of a pound character in ISO-8859-1:
Example output of a pound character in ISO-8859-1:
<lang befunge>"%~"+,@</lang>
<syntaxhighlight lang="befunge">"%~"+,@</syntaxhighlight>


=={{header|Bracmat}}==
=={{header|Bracmat}}==
<lang bracmat>put$£</lang>
<syntaxhighlight lang="bracmat">put$£</syntaxhighlight>


=={{header|C}}==
=={{header|C}}==
{{trans|AWK}}
{{trans|AWK}}
<lang c>#include <stdio.h>
<syntaxhighlight lang="c">#include <stdio.h>


int
int
Line 173: Line 173:
puts("\302\243"); /* if your terminal is utf-8 */
puts("\302\243"); /* if your terminal is utf-8 */
return 0;
return 0;
}</lang>
}</syntaxhighlight>


=={{header|C sharp}}==
=={{header|C sharp}}==
<lang csharp>class Program
<syntaxhighlight lang="csharp">class Program
{
{
static void Main()
static void Main()
Line 182: Line 182:
System.Console.WriteLine("£");
System.Console.WriteLine("£");
}
}
}</lang>
}</syntaxhighlight>
Output:
Output:
<pre>£</pre>
<pre>£</pre>
Line 188: Line 188:
=={{header|C++}}==
=={{header|C++}}==


<lang cpp>#include <iostream>
<syntaxhighlight lang="cpp">#include <iostream>


int main()
int main()
Line 194: Line 194:
std::cout << static_cast<char>(163); // pound sign
std::cout << static_cast<char>(163); // pound sign
return 0;
return 0;
}</lang>
}</syntaxhighlight>


=={{header|Clojure}}==
=={{header|Clojure}}==
<lang clojure>(println "£")</lang>
<syntaxhighlight lang="clojure">(println "£")</syntaxhighlight>


=={{header|COBOL}}==
=={{header|COBOL}}==
{{works with|OpenCOBOL}}
{{works with|OpenCOBOL}}


<lang cobol> IDENTIFICATION DIVISION.
<syntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
PROGRAM-ID. Display-Pound.
PROGRAM-ID. Display-Pound.


Line 209: Line 209:


GOBACK
GOBACK
.</lang>
.</syntaxhighlight>


=={{header|Common Lisp}}==
=={{header|Common Lisp}}==
<lang lisp>
<syntaxhighlight lang="lisp">
(format t "札幌~%")
(format t "札幌~%")
(format t "~C~%" (code-char #x00A3))
(format t "~C~%" (code-char #x00A3))
</syntaxhighlight>
</lang>


=={{header|D}}==
=={{header|D}}==
Assuming unicode support on the terminal
Assuming unicode support on the terminal
<lang d>import std.stdio;
<syntaxhighlight lang="d">import std.stdio;


void main() {
void main() {
writeln('\u00A3');
writeln('\u00A3');
}</lang>
}</syntaxhighlight>
<pre>£</pre>
<pre>£</pre>


=={{header|Dc}}==
=={{header|Dc}}==
Assuming unicode support on the terminal
Assuming unicode support on the terminal
<lang dc>49827 P</lang>
<syntaxhighlight lang="dc">49827 P</syntaxhighlight>


=={{header|EchoLisp}}==
=={{header|EchoLisp}}==
<lang scheme>
<syntaxhighlight lang="scheme">
;; simplest
;; simplest
(display "£")
(display "£")
Line 240: Line 240:
;; CSS enhancement
;; CSS enhancement
(display "£" "color:blue;font-size:2em")
(display "£" "color:blue;font-size:2em")
</syntaxhighlight>
</lang>
{{out}}
{{out}}
<span style="color:blue;font-size:2em">
<span style="color:blue;font-size:2em">
Line 259: Line 259:
The emerging ANS Forth 20xx standard includes an XCHAR wordset which allows manipulation of non-ASCII character sets such as Unicode.
The emerging ANS Forth 20xx standard includes an XCHAR wordset which allows manipulation of non-ASCII character sets such as Unicode.


<lang forth>163 xemit \ , or
<syntaxhighlight lang="forth">163 xemit \ , or
s" £" type</lang>
s" £" type</syntaxhighlight>




=={{header|FreeBASIC}}==
=={{header|FreeBASIC}}==
<lang freebasic>Print Chr(156)</lang>
<syntaxhighlight lang="freebasic">Print Chr(156)</syntaxhighlight>




=={{header|Go}}==
=={{header|Go}}==
<lang go>package main
<syntaxhighlight lang="go">package main


import "fmt"
import "fmt"
Line 274: Line 274:
func main() {
func main() {
fmt.Println("£")
fmt.Println("£")
}</lang>
}</syntaxhighlight>


=={{header|Haskell}}==
=={{header|Haskell}}==
<syntaxhighlight lang="haskell">
<lang Haskell>
module Main where
module Main where
main = do
main = do
putStrLn "£"
putStrLn "£"
putStrLn "札幌"
putStrLn "札幌"
</syntaxhighlight>
</lang>


=={{header|Icon}} and {{header|Unicon}}==
=={{header|Icon}} and {{header|Unicon}}==
Line 288: Line 288:
Write a given character number, say '163', using <code>char</code> to convert the integer into a string.
Write a given character number, say '163', using <code>char</code> to convert the integer into a string.


<syntaxhighlight lang="icon">
<lang Icon>
procedure main ()
procedure main ()
write ("£ " || char (163)) # £
write ("£ " || char (163)) # £
end
end
</syntaxhighlight>
</lang>


=={{header|J}}==
=={{header|J}}==
<lang J> '£'
<syntaxhighlight lang="j"> '£'
£
£
'札幌'
'札幌'
札幌</lang>
札幌</syntaxhighlight>


=={{header|Java}}==
=={{header|Java}}==
<lang Java>import java.io.PrintStream;
<syntaxhighlight lang="java">import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.io.UnsupportedEncodingException;


Line 312: Line 312:
writer.println("札幌");
writer.println("札幌");
}
}
}</lang>
}</syntaxhighlight>


=={{header|Julia}}==
=={{header|Julia}}==
{{trans|C}}
{{trans|C}}
<lang julia>println("£")
<syntaxhighlight lang="julia">println("£")
println("\302\243"); # works if your terminal is utf-8
println("\302\243"); # works if your terminal is utf-8
</syntaxhighlight>
</lang>


=={{header|Kotlin}}==
=={{header|Kotlin}}==
<lang scala>// version 1.1.2
<syntaxhighlight lang="scala">// version 1.1.2


fun main(args:Array<String>) = println("£")</lang>
fun main(args:Array<String>) = println("£")</syntaxhighlight>


=={{header|Lasso}}==
=={{header|Lasso}}==
<lang Lasso>stdout(' £ ')</lang>
<syntaxhighlight lang="lasso">stdout(' £ ')</syntaxhighlight>
Result:
Result:
<pre> £ </pre>
<pre> £ </pre>
Line 332: Line 332:
=={{header|Locomotive Basic}}==
=={{header|Locomotive Basic}}==


<lang locobasic>10 PRINT CHR$(163)</lang>
<syntaxhighlight lang="locobasic">10 PRINT CHR$(163)</syntaxhighlight>


=={{header|Lua}}==
=={{header|Lua}}==
Lua requires an extension module for UTF-8 support. However, the '£' symbol specified for this task is part of extended ASCII (codes 128 - 255) which can be accessed in the same way as normal ASCII.
Lua requires an extension module for UTF-8 support. However, the '£' symbol specified for this task is part of extended ASCII (codes 128 - 255) which can be accessed in the same way as normal ASCII.
<lang Lua>print(string.char(156))</lang>
<syntaxhighlight lang="lua">print(string.char(156))</syntaxhighlight>


=={{header|Mathematica}}/{{header|Wolfram Language}}==
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>FromCharacterCode[{163}]</lang>
<syntaxhighlight lang="mathematica">FromCharacterCode[{163}]</syntaxhighlight>


=={{header|NetRexx}}==
=={{header|NetRexx}}==
<lang NetRexx>/* NetRexx */
<syntaxhighlight lang="netrexx">/* NetRexx */
options replace format comments java crossref symbols binary
options replace format comments java crossref symbols binary


Line 357: Line 357:
say (Rexx GBP).d2c
say (Rexx GBP).d2c
return
return
</syntaxhighlight>
</lang>
{{out}}
{{out}}
<pre>
<pre>
Line 366: Line 366:


=={{header|Nim}}==
=={{header|Nim}}==
<lang nim>echo "£"
<syntaxhighlight lang="nim">echo "£"
echo "札幌"
echo "札幌"


import unicode
import unicode
echo Rune(0xa3)</lang>
echo Rune(0xa3)</syntaxhighlight>


=={{header|Objeck}}==
=={{header|Objeck}}==
<lang objeck>class Program {
<syntaxhighlight lang="objeck">class Program {
function : Main(args : String[]) ~ Nil {
function : Main(args : String[]) ~ Nil {
"£"->PrintLine();
"£"->PrintLine();
}
}
}</lang>
}</syntaxhighlight>


=={{header|Pascal}}==
=={{header|Pascal}}==
<lang Pascal>program pound;
<syntaxhighlight lang="pascal">program pound;
uses crt;
uses crt;
begin
begin
write(chr( 163 ));
write(chr( 163 ));
end.
end.
</syntaxhighlight>
</lang>


=={{header|Perl}}==
=={{header|Perl}}==
<lang perl>use feature 'say';
<syntaxhighlight lang="perl">use feature 'say';


# OK as is
# OK as is
Line 397: Line 397:
say "\N{FULLWIDTH POUND SIGN}";
say "\N{FULLWIDTH POUND SIGN}";
say "\x{FFE1}";
say "\x{FFE1}";
say chr 0xffe1;</lang>
say chr 0xffe1;</syntaxhighlight>


=={{header|Phix}}==
=={{header|Phix}}==
Line 403: Line 403:
See demo\HelloUTF8.exw for a (not very pretty) way to do that programmaticaly.<br>
See demo\HelloUTF8.exw for a (not very pretty) way to do that programmaticaly.<br>
The following assumes you have done that manually, and saved the source code file in UTF-8 format.
The following assumes you have done that manually, and saved the source code file in UTF-8 format.
<!--<lang Phix>(phixonline)-->
<!--<syntaxhighlight lang="phix">(phixonline)-->
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"£"</span><span style="color: #0000FF;">)</span>
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"£"</span><span style="color: #0000FF;">)</span>
<!--</lang>-->
<!--</syntaxhighlight>-->
Output:
Output:
<pre>£</pre>
<pre>£</pre>


=={{header|Picat}}==
=={{header|Picat}}==
<lang Picat>go =>
<syntaxhighlight lang="picat">go =>
println("£"),
println("£"),
println(chr(163)),
println(chr(163)),
println("太極拳"), % Tàijíquán
println("太極拳"), % Tàijíquán
nl.</lang>
nl.</syntaxhighlight>


{{out}}
{{out}}
Line 423: Line 423:


=={{header|PicoLisp}}==
=={{header|PicoLisp}}==
<lang PicoLisp>(prinl (char 26413) (char 24140)) # Sapporo </lang>
<syntaxhighlight lang="picolisp">(prinl (char 26413) (char 24140)) # Sapporo </syntaxhighlight>
Output:
Output:
<pre>札幌</pre>
<pre>札幌</pre>


=={{header|PL/I}}==
=={{header|PL/I}}==
<lang PL/I> declare pound character (1) static initial ('9c'x);
<syntaxhighlight lang="pl/i"> declare pound character (1) static initial ('9c'x);
put skip list (pound);</lang>
put skip list (pound);</syntaxhighlight>


=={{header|PureBasic}}==
=={{header|PureBasic}}==
<lang PureBasic>Print(Chr(163))</lang>
<syntaxhighlight lang="purebasic">Print(Chr(163))</syntaxhighlight>
<pre>£</pre>
<pre>£</pre>


=={{header|Python}}==
=={{header|Python}}==
Python 2:
Python 2:
<lang Python>print u'\u00a3'</lang>
<syntaxhighlight lang="python">print u'\u00a3'</syntaxhighlight>
<pre>£</pre>
<pre>£</pre>
Alternatively, as any Unicode character is legal in Python code:
Alternatively, as any Unicode character is legal in Python code:
<lang Python>£ = '£'
<syntaxhighlight lang="python">£ = '£'
print(£)</lang>
print(£)</syntaxhighlight>
<pre>£</pre>
<pre>£</pre>


=={{header|R}}==
=={{header|R}}==
<lang R>cat("£")</lang>
<syntaxhighlight lang="r">cat("£")</syntaxhighlight>
{{out}}
{{out}}
<pre>£</pre>
<pre>£</pre>


=={{header|Racket}}==
=={{header|Racket}}==
<lang racket>
<syntaxhighlight lang="racket">
#lang racket
#lang racket
(display "£")
(display "£")
</syntaxhighlight>
</lang>


=={{header|Raku}}==
=={{header|Raku}}==
(formerly Perl 6)
(formerly Perl 6)
To demonstrate we're not limited to Latin-1, we'll print the fullwidth variant.
To demonstrate we're not limited to Latin-1, we'll print the fullwidth variant.
<lang perl6>say '£';
<syntaxhighlight lang="raku" line>say '£';
say "\x[FFE1]";
say "\x[FFE1]";
say "\c[FULLWIDTH POUND SIGN]";
say "\c[FULLWIDTH POUND SIGN]";
0xffe1.chr.say;</lang>
0xffe1.chr.say;</syntaxhighlight>


=={{header|REXX}}==
=={{header|REXX}}==
<lang rexx>/*REXX program demonstrates displaying an extended character (glyph) to the terminal.*/
<syntaxhighlight lang="rexx">/*REXX program demonstrates displaying an extended character (glyph) to the terminal.*/
/* [↓] this SAY will display the £ glyph (if the term supports it).*/
/* [↓] this SAY will display the £ glyph (if the term supports it).*/
say '£' /*this assumes the pound sign glyph is displayable on the terminal. */
say '£' /*this assumes the pound sign glyph is displayable on the terminal. */
/*this program can execute correctly on an EBCDIC or ASCII machine.*/
/*this program can execute correctly on an EBCDIC or ASCII machine.*/
/*stick a fork in it, we're all done. */</lang>
/*stick a fork in it, we're all done. */</syntaxhighlight>
{{out|output|text=:}}
{{out|output|text=:}}
<pre>
<pre>
Line 475: Line 475:


=={{header|Ring}}==
=={{header|Ring}}==
<lang ring>
<syntaxhighlight lang="ring">
# Project : Terminal control/Display an extended character
# Project : Terminal control/Display an extended character


see "£"
see "£"
</syntaxhighlight>
</lang>
Output:
Output:
<pre>
<pre>
Line 486: Line 486:


=={{header|Ruby}}==
=={{header|Ruby}}==
<lang ruby>#encoding: UTF-8 #superfluous in Ruby > 1.9.3
<syntaxhighlight lang="ruby">#encoding: UTF-8 #superfluous in Ruby > 1.9.3
puts "£"</lang>
puts "£"</syntaxhighlight>


=={{header|Scala}}==
=={{header|Scala}}==
{{libheader|Scala}}<lang Scala>object ExtendedCharacter extends App {
{{libheader|Scala}}<syntaxhighlight lang="scala">object ExtendedCharacter extends App {
println("£")
println("£")
println("札幌")
println("札幌")
}</lang>
}</syntaxhighlight>


=={{header|Seed7}}==
=={{header|Seed7}}==
A [http://seed7.sourceforge.net/libraries/console.htm#write%28ref_console_file,in_string%29 write]
A [http://seed7.sourceforge.net/libraries/console.htm#write%28ref_console_file,in_string%29 write]
to a [http://seed7.sourceforge.net/libraries/console.htm console] accepts Unicode characters.<lang seed7>$ include "seed7_05.s7i";
to a [http://seed7.sourceforge.net/libraries/console.htm console] accepts Unicode characters.<syntaxhighlight lang="seed7">$ include "seed7_05.s7i";
include "console.s7i";
include "console.s7i";


Line 510: Line 510:
# the program waits until Return/Enter is pressed.
# the program waits until Return/Enter is pressed.
readln;
readln;
end func;</lang>
end func;</syntaxhighlight>


=={{header|Sidef}}==
=={{header|Sidef}}==
<lang ruby>say '£';
<syntaxhighlight lang="ruby">say '£';
say "\x{FFE1}";
say "\x{FFE1}";
say "\N{FULLWIDTH POUND SIGN}";
say "\N{FULLWIDTH POUND SIGN}";
say 0xffe1.chr;</lang>
say 0xffe1.chr;</syntaxhighlight>


=={{header|Tcl}}==
=={{header|Tcl}}==
Provided the system encoding has a “£” symbol in it, this works:
Provided the system encoding has a “£” symbol in it, this works:
<lang tcl>puts \u00a3</lang>
<syntaxhighlight lang="tcl">puts \u00a3</syntaxhighlight>
Tcl can output all unicode characters in the BMP, but only if the consumer of the output (terminal, etc.) is able to understand those characters in its current encoding will the output actually make sense. Strictly, this is not a limitation of Tcl but of the environment in which it is placed.
Tcl can output all unicode characters in the BMP, but only if the consumer of the output (terminal, etc.) is able to understand those characters in its current encoding will the output actually make sense. Strictly, this is not a limitation of Tcl but of the environment in which it is placed.




=={{header|Verilog}}==
=={{header|Verilog}}==
<lang Verilog>module main;
<syntaxhighlight lang="verilog">module main;
initial begin
initial begin
$display("£");
$display("£");
end
end
endmodule</lang>
endmodule</syntaxhighlight>




=={{header|Wren}}==
=={{header|Wren}}==
<lang ecmascript>System.print("£")</lang>
<syntaxhighlight lang="ecmascript">System.print("£")</syntaxhighlight>


=={{header|Xidel}}==
=={{header|Xidel}}==
http://videlibri.sourceforge.net/xidel.html
http://videlibri.sourceforge.net/xidel.html
<lang bash>xidel -s -e 'parse-html("&#163; or &#xa3")'
<syntaxhighlight lang="bash">xidel -s -e 'parse-html("&#163; or &#xa3")'
£ or £</lang>
£ or £</syntaxhighlight>
<lang bash>echo '"\u00a3"' | xidel -s - -e 'json($raw)'
<syntaxhighlight lang="bash">echo '"\u00a3"' | xidel -s - -e 'json($raw)'
£
£


xidel -s -e 'json("""\\u00a3""")' --xquery 'json("&quot;\\u00a3&quot;")'
xidel -s -e 'json("""\\u00a3""")' --xquery 'json("&quot;\\u00a3&quot;")'
£
£
£</lang>
£</syntaxhighlight>


=={{header|XPL0}}==
=={{header|XPL0}}==
<lang XPL0>code ChOut=8;
<syntaxhighlight lang="xpl0">code ChOut=8;
ChOut(0, $9C) \code for IBM PC's extended (OEM) character set
ChOut(0, $9C) \code for IBM PC's extended (OEM) character set
</syntaxhighlight>
</lang>




=={{header|Yabasic}}==
=={{header|Yabasic}}==
<lang freebasic>print chr$(156)</lang>
<syntaxhighlight lang="freebasic">print chr$(156)</syntaxhighlight>




=={{header|zkl}}==
=={{header|zkl}}==
If you output device support UTF-8 then:
If you output device support UTF-8 then:
<lang zkl>"\u00a3 \Ua3;".println() //-->£ £</lang>
<syntaxhighlight lang="zkl">"\u00a3 \Ua3;".println() //-->£ £</syntaxhighlight>