Re: Template: unicode problem

2007-07-31 Thread Malcolm Tredinnick
On Tue, 2007-07-31 at 15:40 +, Mario Gonzalez wrote: > Hello, I'm getting some problems with unicode in templates: 'ascii' > codec can't encode character u'\xf1' in position 1: ordinal not in > range(128) However, templates, database are in UTF8. I changed > __str__ by __unicode__ in my

Re: Template: unicode problem

2007-07-31 Thread Mario Gonzalez
On 31 jul, 12:28, Mario Gonzalez <[EMAIL PROTECTED]> wrote: > > I understand it and please forgive my pour words :-) I'll do what > you said and I'll try to fix it by my self today. If not, I'll write > to this list for any comments. > The problem: I had a non-ascii character (ñ) in my

Re: Template: unicode problem

2007-07-31 Thread Malcolm Tredinnick
Mario, On Tue, 2007-07-31 at 15:40 +, Mario Gonzalez wrote: [...] > Django (I think) is trying to encode an ascii string. I modified > django/template/__init__.py line 704 and just for testing purposes I > deleted raise and I changed it by print e > > Index: __init__.py >

Re: Template: unicode problem

2007-07-31 Thread Mario Gonzalez
On 31 jul, 12:18, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > There may well be a problem, but from the current information there is a > 0% chance of anybody being able to guess the solution. There are just > too many things it could be from bad strings in your code to bad > handling on some

Template: unicode problem

2007-07-31 Thread Mario Gonzalez
Hello, I'm getting some problems with unicode in templates: 'ascii' codec can't encode character u'\xf1' in position 1: ordinal not in range(128) However, templates, database are in UTF8. I changed __str__ by __unicode__ in my models files. Django (I think) is trying to encode an ascii