Im having trouble to get 'funky' characters to work with newform posts.

I have read the posts on the subject, and Im not sure if I run into a
bug...


class Guide(models.Model):
   about = models.CharField(maxlength=1500)


class EditForm(forms.Form):
       about =
forms.CharField(widget=forms.Textarea(attrs={'rows':'15',
'cols':'40'}),max_length=1500, required=False)


In my view:

if edit_form.is_valid():
       clean_data = edit_form.clean_data
       guide.about = clean_data['about']
       guide.save()

When posting 'A word about ÅÄÖ'  mysql gives: Warning: Data
truncated for column 'about' at row 1
 return self.cursor.execute(sql, params)  and stores everything up to
the funky chars.

If I change to "raw" input  (guide.about = request.POST['about'] ) it
actually get stored in db but guide.save() throws UnicodeDecodeError:
'ascii' codec can't decode byte 0xc3 in position 90: ordinal not in
range(128)

Please, any help would be valuable

Regards
Sten


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to