Re: unicode question

2011-03-29 Thread George Lund
I can't explain the additional space, but URL-encoding a Unicode string isn't generally possible, it needs to be encoded first. UTF-8 is almost always the correct encoding to use, so in your case: qk = quote(query_text.encode('utf8')) Anything you can do to avoid having to include text like

unicode question

2011-03-29 Thread Mike Thon
Hi - I'm not sure if this is a Django problem, but I'm working on a Django project so I thought I'd start here. In my project users will submit text by way of a text field which will eventually be encoded with urllib.quote() and used in a url. When I submit text, certain characters appear on

Re: yet another unicode question...

2009-03-18 Thread Adi Sieker
Hi, On 19.03.2009, at 11:02, Juan Hernandez wrote: > Hi there, > > This has been killing me for hours and I don't know what else to do. > Is about the famous charset in django. > > I have this model: > > class Post(models.Model): > user = models.ForeignKey(User) > category =

Re: yet another unicode question...

2009-03-18 Thread Briel
Hi. I'm not sure what exactly you are doing and how/where you are displaying this stuff. But it sounds like you are escaping the html, django does this by default to protect sites from XSS attacks ect. You can either stop the auto escaping in the template or use the |safe tag. You can read about

Re: yet another unicode question...

2009-03-18 Thread Alex Gaynor
On Wed, Mar 18, 2009 at 11:32 AM, Juan Hernandez wrote: > Hi there, > > This has been killing me for hours and I don't know what else to do. Is > about the famous charset in django. > > I have this model: > > class Post(models.Model): > user = models.ForeignKey(User) >

yet another unicode question...

2009-03-18 Thread Juan Hernandez
Hi there, This has been killing me for hours and I don't know what else to do. Is about the famous charset in django. I have this model: class Post(models.Model): user = models.ForeignKey(User) category = models.ForeignKey(Categories) title = models.CharField(max_length=50) post

Re: Unicode question

2007-08-21 Thread Malcolm Tredinnick
On Mon, 2007-08-20 at 17:27 +, arthur debert wrote: > Hi Rob. > > After the unicode branch merge django expects and produces unicodes > objects throughout. > > A detail how to port guide is here: > http://code.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist > > In

Re: Unicode question

2007-08-20 Thread arthur debert
Hi Rob. After the unicode branch merge django expects and produces unicodes objects throughout. A detail how to port guide is here: http://code.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist In this specific case, you can call "lower" directly on your unicode object:

Unicode question

2007-08-20 Thread Rob Slotboom
After moving to the latest version of Django one of the functions I wrote fails to work. I'll drop the code... def year_cal(sectie, req_year = None, req_month=None): cur_year= str(datetime.datetime.now().year) cur_month= datetime.datetime.now().strftime("%b") all_month_list = ['jan',