On Wed, 3 Mar 2010 16:32:01 +0100
Giorgio <anothernetfel...@gmail.com> wrote:

> Uff, encoding is a very painful thing in programming.

For sure, but it's true for any kind of data, not only text :-) Think at music 
or images *formats*. The issue is a bit obscured for text but the use of the 
mysterious, _cryptic_ (!), word "encoding".

When editing an image using a software tool, there is a live representation of 
the image in memory (say, a plain pixel 2D array), which is probably what the 
developper found most practicle for image processing. [text processing in 
python: unicode string type] When the job is finished, you can choose between 
various formats (png, gif, jpeg..) to save and or transfer it. [text: 
utf-8/16/32, iso-8859-*, ascii...]. Conversely, if you to edit an existing 
image, the software needs to convert back from the file format into its 
internal representation; the format need to be indicated in file, or by the 
user, or guessed.

The only difference with text is that there is no builtin image or sound 
representation _type_ in python -- only because text and sound are domain 
specific data while text is needed everywhere.

Denis
-- 
________________________________

la vita e estrany

spir.wikidot.com

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to