0

What type of code language is Unicode considered?

It's not a programming language, and it seems much closer to HTML, so it may be markup, I think, but still... There are some important differences between HTML and Unicode in terms of function, so I'm unsure.

3 Answers 3

1

Unicode is not a language at all. It is a character encoding or in other words it is a way of interpreting a set of binary bits to represent written characters.

5
  • But HTML does this, and HTML is considered a language. :/
    – user402879
    Commented Jun 11, 2015 at 19:04
  • @SarahofGaia, HTML does what? HTML is a markup language consisting of a series characters (Unicode or another encoding like ASCII) that are interpreted by a web browser to display a document.
    – heavyd
    Commented Jun 11, 2015 at 20:03
  • HTML has particular unique strings of characters that represent a distinct grapheme or symbol, just as Unicode does. Although I'm aware that unlike Unicode, HTML also provides formatting properties, there is still that overlap. That's what I was getting at.
    – user402879
    Commented Jun 14, 2015 at 0:14
  • 1
    @SarahofGaia, I would say the biggest difference is that Unicode isn't interpreting or parsing a string of characters, its interpreting a series of bits. Its more of just mapping of bits to characters, not a full language.
    – heavyd
    Commented Jun 14, 2015 at 4:32
  • Oh, I see. So whilst HTML produces character 𝑋 using &ABCD;, Unicode produces the same character but through U+WXYZ. Is that what you're saying?
    – user402879
    Commented Jun 15, 2015 at 3:06
1

Unicode isn't a language at all, just like the Alphabet isn't English in and of itself. It's the combination of letters in specific combinations (words) that give it meaning. It's a standard of assigning unique codes to unique symbols.

A = U+0041
a = U+0061
! = U+0021
Ω = U+03A9

Wiki

EDIT for SarahofGaia: As @heavyd said, HTML is a markup language, it governs how elements are displayed on a website. A programming language dictates actions for the computer to take. Unicode doesn't "do" anything by itself.

An analogy might be imagining Unicode to be a brick. By itself, it's just a brick. You can have red bricks, yellow bricks, big bricks, small bricks, etc., but it doesn't do anything. Now think of a brick house, you've got many kinds of bricks: foundation bricks, wall bricks, chimney bricks, etc., all working together to do something - be a house. The house could be anything, a website, a program, your Senior English research paper, all made up of Unicode. You can make up the same "house" from any number of "materials": wood (ASCII), steel (UTF-8), etc. Here's some more generic info about character encoding.

3
  • See answer to heavyd.
    – user402879
    Commented Jun 11, 2015 at 19:04
  • I never said HTML or Unicode was a markup language. I said "code language". Unicode is a code, albeit maybe not a language nor a particular type thereof.
    – user402879
    Commented Jun 14, 2015 at 0:15
  • I know that Unicode is like that. But both Unicode and HTML can represent distinct characters using specific, unique strings of characters. For example, the em dash can be written either by U+2014 or by —. I'm also aware that whilst HTML can be used to also create certain extra formatting, Unicode cannot. But as I said to @heavyd, there's that overlap between them.
    – user402879
    Commented Jun 14, 2015 at 0:19
1

Unicode is an encoding scheme, not a markup language or any type of language. Encoding schemes are used to read/write text of markup languages, for example.

Computers/CPUs are, at their heart (and the reason they were invented - and the reason why they are called computers) nothing but really fast calculators. I'm sure you've heard before that computers can only work with individual bits or 1's and 0's. This is true, but most CPU operations work on sets of 8 bits (bytes) or 16 bits (words) or more (32, 64, etc.)

Essentially: CPUs work with numbers and nothing more. Internally, everything in a CPU is a number.

Of course, early on, people also wanted to use computers to perform operations on text - at the very least, to print out reports containing things other than numbers.

Computers can also control external devices - the teletypewriter, for example, being an early such device.

We can write a program to talk to a teletypewriter - but certainly we want to do more than send it numbers. We'd like to send it letters, punctuation, and the other symbols that form understandable text. How exactly the device renders the text is up to the device, but what is needed is some sort of scheme that assigns a number to each symbol. That way the CPU can deal with numbers like it wants to, but each number "stands for" a symbol. This is what Unicode is.

Baudot was an early scheme (goes back to 1874!), followed by EBCIDC and ASCII. EBCIDC was widely used by IBM and still is on their modern mainframe-level systems. ASCII was very widely used but was limited to Latin characters only. Unicode (of which ASCII is a subset) is the common scheme in use today, and it's possible to use subsets of it, such as UTF-8 (which is essentially the same as ASCII).

Now, with HTML, you read it with your display and understand the text. Internally in RAM, Unicode is used to represent each symbol of the HTML document in memory, and also on disk, and also in transit over the network. Your operating system went through each byte of RAM and rendered each character using a graphics library, using the number or code point as an index, so you could view the part you are seeing on screen.

In the case of a browser, when your browser receives the page, it has to go through each byte of the page and parse all the elements. Boiled down to the lowest level, this involves looking for patterns of numbers. Simplifying somewhat, for example, in UTF-8, <div> would be (in hex) 3C 64 69 76 3E, and when the browser's parser finds that sequence of numbers it knows it's found the start of a div tag and can take appropriate action.

HTML is "on top of" the encoding scheme, and you could use ASCII or EBCIDC if you wanted to, as long as the application needing to deal with the HTML (text editor, browser) understands the encoding method.

2
  • But there's a bit of overlap between HTML and Unicode: while HTML can add certain extra formatting and Unicode cannot, both of them also employ particular strings of characters to represent unique, distinct graphemes or symbols. For example, the em dash can be inputted either by U+2014 in Unicode or &mdash; in HTML.
    – user402879
    Commented Jun 14, 2015 at 0:22
  • Also, I learned a good deal from your explanation. Thank you for that. It was very interesting. 👍
    – user402879
    Commented Jun 14, 2015 at 0:23

You must log in to answer this question.