Re: Any way to tolerate Unicode w/o changing '' to u''?...

2016-04-21 Thread Tim Graham
I guess you might want six.text_type. https://docs.djangoproject.com/en/dev/topics/python3/#string-handling may help. On Wednesday, April 20, 2016 at 11:41:47 PM UTC-4, Fred Stluka wrote: > > Tim, > > Excellent response, thanks! The link to the doc is just what I > needed. > > One more

Re: Any way to tolerate Unicode w/o changing '' to u''?...

2016-04-20 Thread Fred Stluka
Tim, Excellent response, thanks!  The link to the doc is just what I needed. One more question.  I'm still getting UnicodeEncodeError on some calls to str() because I should now be calling unicode() instead.  Any easy way to map all of my str() calls to

Re: Any way to tolerate Unicode w/o changing '' to u''?...

2016-04-14 Thread Tim Graham
You want `from __future__ import unicode_literals`: https://docs.djangoproject.com/en/dev/ref/unicode/#general-string-handling On Thursday, April 14, 2016 at 6:27:07 PM UTC-4, Fred Stluka wrote: > > Django users, > > In my Django app, I want to allow users to enter Unicode > strings. But if

Re: Any way to tolerate Unicode w/o changing '' to u''?...

2016-04-14 Thread Fred Stluka
Stephen, Perfect!  Thanks! --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we

Re: Any way to tolerate Unicode w/o changing '' to u''?...

2016-04-14 Thread Stephen J. Butler
from __future__ import unicode_literals On Thu, Apr 14, 2016 at 5:26 PM, Fred Stluka wrote: > Django users, > > In my Django app, I want to allow users to enter Unicode > strings. But if they do, I get UnicodeEncodeError when I call > format() to embed their string into

Any way to tolerate Unicode w/o changing '' to u''?...

2016-04-14 Thread Fred Stluka
Django users, In my Django app, I want to allow users to enter Unicode strings.  But if they do, I get UnicodeEncodeError when I call format() to embed their string into other strings.  Is there an easy way to tolerate the Unicode? Details: After