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
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 other strings. Is ther
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 n
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 the
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 uni
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 questio
6 matches
Mail list logo