converting UTF-8 to HTML

Polytropon freebsd at edvax.de
Sun Apr 22 11:06:50 UTC 2012


On Sun, 22 Apr 2012 11:45:45 +0100, Matthew Seaman wrote:
> On 22/04/2012 10:17, Erik Nørgaard wrote:
> > UTF-8 is variable with, ascii characters are stored as single bytes (not
> > sure about iso-8859-1) while other characters are stored as two byte chars.
> 
> ascii uses the low 128 values that you can assign to an unsigned char,
> ie. those where the high-order bit is zero.
> 
> iso-8859-1 and the various other iso-8859-X character sets fill in the
> remaining 128 characters with various other glyphs useful in latin
> alphabets, so it's still one char per glyph.  Other alphabets (greek,
> cyrillic, etc) have similar one byte-per glyph encodings. But you have
> to know what the encoding is to display the content correctly, and it is
> difficult to mix chunks of text in different encodings in the same document.

How about the "extended ASCII character set" that has a mixture
of "non-US glyphs" and semi-graphic symbols?

	http://asciiset.com/extended.gif

This default layout isn't tied to a specific encoding, if I
remember correctly, or is it? Accessing the set as seen in the
picture allows using "special character" from many languages,
such as german umlauts and eszett, greek gamma and phi,
danish o-slash, swedish a-circle and even the yen symbol.
And the nice semi-graphic symbols to draw boxes and backgrounds,
as well as card deck symbols or the "lazy L".

Of course, there are no arabic or chinese letters in there,
so it can be seen as a "roman-derived language" centrism
(targeting europe and america in the first place). All of
them are natively supported by graphic cards when running
in text mode, if my assumption is correct. So this "extended
set of capabilities" still is the most-minimum common
functionality that one can rely on.

(FreeBSD remaps some of the characters in text mode to display
the semi-graphic mouse pointer, so the full set cannot be
used all the time.)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list