Mike Dee wrote: > A very very basic UTF-8 question that's driving me nuts: > > If I have this in the beginning of my Python script in Linux: > > #!/usr/bin/env python > # -*- coding: UTF-8 -*- > > should I - or should I not - be able to use non-ASCII characters > in strings and in Tk GUI button labels and GUI window titles and in > raw_input data without Python returning wrong case in manipulated > strings and/or gibberished characters in Tk GUI title? > > > [snip..]
Yet another reply... :-) My understanding is that the encoding declaration (as above) only applies to the source code - and will not make your string literals into unicode objects, nor set the default encoding for the interpreter. This will mean string literals in your source code will be encoded as UTF8 - if you handle them with normal string operations you might get funny results. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list