in controllers.py, line 1264, kw.get(field) returns a unicode object (depending on what
field it is) and then tries to convert it with str().
Line 1265, current_val is also often a unicode object.
1264: new_val = str(kw.get(field) or "")
1265: if str(current_val) != new_val:
function_name = '%s_change_handler' % field
field_change_handler = getattr(SystemSaveForm.handler,function_name,None)
if field_change_handler is not None:
kw = field_change_handler(current_val,new_val,**kw)
And when you try and do
it dies a horrible death.
----- "Bill Peck" <bpeck(a)redhat.com> wrote:
From: "Bill Peck" <bpeck(a)redhat.com>
To: "Raymond Mancy" <rmancy(a)redhat.com>
Cc: "beaker-devel" <beaker-devel(a)lists.fedorahosted.org>
Sent: Tuesday, May 25, 2010 11:03:01 PM GMT +10:00 Brisbane
Subject: Re: UTF-8 changes branch
On 05/25/2010 03:12 AM, Raymond Mancy wrote:
> Actually the problem is slightly different from what I originally
> I think what's actually happening is that a couple of places in the
code it tries to
> create a str object from a unicode object. This works fine unless
the unicode object has non
> ascii characters.
> I think all we need to do is remove these attempts to create a str
object from a unicode object
> as it's not needed from what I can tell. So far i've only found one
place where it tries to do this.
Can you give some examples from the code where we do this
> ----- "Kevin Baker"<kbaker(a)redhat.com> wrote:
>> From: "Kevin Baker"<kbaker(a)redhat.com>
>> To: "Raymond Mancy"<rmancy(a)redhat.com>
>> Cc: "Bill Peck"<bpeck(a)redhat.com>
>> Sent: Monday, May 24, 2010 11:38:49 PM GMT +10:00 Brisbane
>> Subject: Re: UTF-8 changes branch
>> can you have this discussion on the dev list please.
>> and who is e(a)redhat.com?
>> On Mon, May 24, 2010 at 09:36:10AM -0400, Raymond Mancy wrote:
>>> In model.py and controllers/py I kind of started to turn the
>> into Unicode objects but then stopped.
>>> I was thinking we could override the __str__() function to do
>> something like unicode(x).encode('utf-8').
>> Kevin Baker
>> Manager Engineering Operations, Westford +1 978 392 2442