to use unicode strings only

G

Gaudha

Hey gentlemen,

I wanna make all the strings in my code unicode strings. How to do it
without giving unicode switch 'u' before every string?
 
M

MRAB

Gaudha said:
Hey gentlemen,

I wanna make all the strings in my code unicode strings. How to do it
without giving unicode switch 'u' before every string?

Use Python 3.1 instead.
 
B

Benjamin Peterson

Gaudha said:
Hey gentlemen,

I wanna make all the strings in my code unicode strings. How to do it
without giving unicode switch 'u' before every string?

Or the -U flag, but that's probably a bad idea.
 
G

Gaudha

or use

from __future__ import unicode_literals

in Python 2.6.

I know about Python 3.1 have the capability. But, unfortunately the
community for which I'm working do not prefer Python 3.*...

And Peter, I tried importing the __future__ module. It's also not
working...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top