Hi Ryan,

I'm also using Django to work with Japanese text and had similar
problems when I was starting.  Actually, you're a step ahead of me,
since I didn't even know about MySQLdb at that point. :)

- If you haven't already, check the Django docs Internationalization
page, including the comments:
http://www.djangoproject.com/documentation/i18n/

- If you're using a version of MySQL prior to 4.1, you should consider
upgrading.  4.1 has a lot more support for unicode.

- Are you *sure* that your entire database is in utf8?  I thought mine
was (it's a long story) but it turned out that many tables were still
in latin1, with the Japanese text encoded in latin1.  Check your
database and all your individual tables to make sure.  Do a mysqldump
and look at the CHARSET settings for each table.

- I found this article during my conversion experience, and perhaps
it'll be helpful.  I didn't have to do everything this guy did, and
he's using 5.0 instead of 4.1, but maybe some of the ideas will be
helpful:
http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html

Good luck and ganbatte kudasai!
--geoff


ginstrom wrote:
> My site needs to display and edit Japanese text. I have a MySQL
> database, with the content encoding set to 'utf-8'.
>
> If I use raw SQL queries using MySQLdb, I am able to create, edit, and
> display entries with Japanese text from within django without problems.
> However, if I use the django models in my views, the Japanese text
> comes out garbled. This also happens on the admin interface, even with
> a very simple model with just one text field.
>
> I would greatly appreciate some pointers on fixing this.
>
> I know that the subject of utf-8 in django has come up, but I wasn't
> able to find a solution in the existing threads. Apologies if I have
> missed the answer somewhere.
> 
> Regards,
> Ryan Ginstrom


--~--~---------~--~----~------------~-------~--~----~
 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