[I18n-sig] Literal strings

Paul Prescod paul@prescod.net
Sat, 03 Jun 2000 14:23:22 -0500

"M.-A. Lemburg" wrote:
> ....

> The safest way to do this certainly is by fixing all
> instances to use u"" instead of "" (not that hard, really).
> Even though this may look strange at first, reading the code
> will immediately bring your attention to the fact that you
> are dealing with Unicode here -- a #pragma at the top won't
> get that much attention and a casual user might wonder
> where the u"" strings in variable dumps originate from.

I guess that's our philosophical difference. I don't want to go around
thinking about the fact that I am using Unicode. I want to test it 
once and then have it "just work."

> One way to do this is by turning
> all "" string literals into u"" assuming the encoding
> given in the #pragma e.g. Latin-1 or MacRoman -- this would
> be along the lines of what you have in mind. 

Yes, this would probably be acceptable.

> The problem
> with this is that some string literaly might have to map
> to 8-bit strings, so for these you'd need to write e.g.
> s"" or something similar.

Right, or call a conversion function.

 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Simplicity does not precede complexity, but follows it. 
	- http://www.cs.yale.edu/~perlis-alan/quotes.html