Le 23 avr. 07 à 20:43 Soir, Kirk Gray a écrit:

> On Apr 23, 2007, at 11:39 AM, Arnaud Nicolet wrote:
>
>> Just a question here: why did other encodings start from a base (the
>> ascii)?
>> They could keep a 7 bits scheme and be a completely-independent
>> encoding.
>>
> Lots of people refer to these extra characters as "high ASCII".
> Which it isn't because ASCII is a 7-bit encoding.  But it is a clear
> way to refer to the characters made possible by the using the extra  
> bit.
>
>> Do you know how one can make an encoding?
>
> You just make it up.  Say you want to have the 26 Roman alphabet
> characters, uppercase only.  There are 26 characters, so you need 5
> bits.  5 bits will allow 32 characters, so your 26 will fit nicely.
> Now make a table:
>
> 00001 - A
> 00010 - B
> 00011 - C
> 00100 - D
> 00101 - E
> ...
> 11010 - Z
>
> Now you adhere to it.  When your program encounters "00001" in a
> binary string, it knows it's an "A", etc.  Plus you have to decide
> how to store it in an 8-bit world.  Will you pad the front with zeros
> to make your 5-bit encoding fit in an 8-bit byte?  This would leave
> you with 3 "High Arnaud" bits that people might find a use for since
> you're not using them.  Or you could pack them, three 5-bit
> characters into a 16-bit word (with 1 left over).  But then you have
> to build packing and un-packing routines.
>
> Of course, since we live in an ASCII/Unicode world, you'd have to
> make ASCII/Unicode to Arnaud and Arnaud to ASCII/Unicode conversion
> routines.

So, in RB, we have to compute every byte read.
There is no way of having the encoding predefined?
Like when we say: ConvertEncoding(MyText,Encodings.UTF8), RB knows  
UTF8 and does not compute the bytes itself (there is something that I  
don't know which handles automatically UTF8).

>> Say I want to make an encoding named "Arnaud" (a really strange
>> encoding where letters are animated and in half-blue and half-green),
>> how could I start?
>
> In the olden days, you'd build it into the Arnaud character generator
> chip for your terminal or microcomputer.  Now, you'd use a font
> creation program like Fontographer or Font Lab.  But since neither
> TrueType nor Postscript support animation, you'd probably have to
> create your own Arnaud rendering engine in a canvas or something to
> draw your animations.

Thank you.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to