Hello I am trying to display the Dice Unicode characters on a web sever using bash, however I am finding it more difficult then it should be. In short I found online that (printf '\u0026') works and prints & to my page. However when I change the number to my desired '\u2680' nothing is displayed. Admittedly I am not very knowledgeable in linux nor unicode. But I am very confused on why a lower number will work and a higher one will not, or what I am doing wrong.
Asked
Active
Viewed 378 times
0
-
@aioobe I started with that thread but ( echo -e "\xE2\x98\xA0") outputs a~ with a haveing a ^ over it. Not the skull and crossbones that it should. Except in the command line where it works as expected. – Noob Apr 18 '15 at 22:33
-
Which linux distribution are you using? Are you working in a console, or using ssh to connect to the linux machine? – rici Apr 18 '15 at 23:21
2 Answers
0
I think I may have found the answer. I think that because I am echoing everything into a html it is parsing the Unicode in html and not using linux. (Not 100% sure about that so correct me if I am wrong.)
Either way, by simply putting the html code for the dice characters into the sh file I was able to display the characters that I wanted.
(i.e echo '⚀(;)' without the parentheses)

Noob
- 145
- 2
- 9
0
First you need to provide more information regarding what you are generating using bash. Put a sample script and specify what operating system and web server are you using.
It is essential to be sure that the encoding using by shell/bash is the same as the default encoding of the webserver. The HTML page must have a proper encoding specified in the header.

sorin
- 161,544
- 178
- 535
- 806