More thoughts on Unicode 
Author Message
 More thoughts on Unicode

I think the print statement blowing if it doesn't like a character is pretty unhelpful. It's all the
more awkward when, as Mark pointed out, its used frequently for debugging output.

Many years ago I used to work on IBM mainframes which uses the EBCDIC code table. However, most of
the access to this system was through class teletypes which were ASCII.

The interface used to substitutute anything that didn't translate cleanly into a question mark.

This worked well and you could tell if your program was misbehaving because you'd find odd question
marks in your output.

Why couldn't python adopt a similar approach? If a context requires a string and gets Unicode,
Python should translate automatically using a sensible localised (and overridable) default.
Characters that don't translate are replaced with a question mark.

If the default behaviour doesn't suite your purpose THEN you have to investigate the mechanics of
translating explicitly.

I'd much rather have output with some errors in it than no output at all and the program blowing
half way through.
--
Dale Strickland-Clark
Out-Think Ltd
Business Technology Consultants



Wed, 21 May 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ANNOUNCE: unicode 0.4, command line unicode database query tool

2. Dolphin deepCopy, seems deeper than I thought?

3. Tool of Thought, phone contacts

4. Tool of Thought seminar in Manhattan

5. TOOL of THOUGHT, January '93

6. TimeStamp, Date and Time Thoughts...

7. Notation as a Tool of Thought

8. looking for info ref OLD computer language thought to run on IBM

9. Past Tool-of-Thought procedings available

10. Tool-of-Thought X Followup

11. Impressions - Tool of Thought X

12. Still time to register for tool-of-thought

 

 
Powered by phpBB® Forum Software