Well, you already set the character set correctly on the database, so
thing should just work now. If it's not, you probably just need to
restart MySQL. Lemme know if you're still having trouble.

-- Andrew

On Jul 20, 6:58 pm, Larry <yuelizh...@gmail.com> wrote:
> Hi Andrew,
>
> Thank you very much. I have changed the settings as you said.
> Just one more question: for the tables and databases that I already
> have,
> is there any way in which I can make changes in place so that things
> will look right? I want to do this because the tables I have are quite
> large
> and it will take a long time to recreate and reload them.
>
> Thanks!!
> -Larry
>
> On Jul 20, 10:58 am, Andrew Fong <fongand...@gmail.com> wrote:
>
>
>
> > Yeah, that output doesn't look correct. You're getting back two
> > characters for ø when there should be just one.
>
> > One possibility is that while you've set up the database server to
> > store things as utf8, the client hasn't been set to read them. You can
> > do this manually from the client, but if you have no need for any
> > other encoding, you should probably just edit the my.cnf and have it
> > use utf8 as the default for everything.
>
> > Relevant code 
> > here:http://andrewfong.wordpress.com/2009/06/07/utf8-unicode-in-mysql/
>
> > -- Andrew
>
> > On Jul 20, 10:25 am,Larry<yuelizh...@gmail.com> wrote:
>
> > > HI Andrew,
>
> > > Thanks for your reply. I tried it via Django's shell, one message
> > > which
> > > appears "Isbjørn" in the MySQL client is displayed as "Isbj\xc3\xb8rn"
> > > in the
> > > Django shell. Is this normal or there is already something wrong?
>
> > > The way I configure MySQL is that I use some parameters when creating
> > > the
> > > database, like this
>
> > > create database db_name default character set utf8 collate
> > > utf8_general_ci;
>
> > > I haven't changed the my.cnf file, could you tell me which is the best
> > > way to
> > > configure the MySQL or Django?
>
> > > Thanks a lot!
> > > -Larry
>
> > > On Jul 17, 5:43 pm, Andrew Fong <fongand...@gmail.com> wrote:
>
> > > > Try fetching the data via Django's shell. What do you get then?
>
> > > > Also, how did you configure MySQL to work with UTF-8? Did you modify
> > > > your my.cnf file so UTF-8 is the default? Or did you change your
> > > > database's settings manually? Or something else?
>
> > > > -- Andrew
>
> > > > On Jul 17, 5:33 pm,Larry<yuelizh...@gmail.com> wrote:
>
> > > > > Hi,
>
> > > > > I have a database with messages stored and utf-8 encoded. The messages
> > > > > look OK in the database, i.e, when I am in MySQL client the messages
> > > > > with special characters (e.g., Korean) are correctly displayed.
> > > > > However, in the web page, the special characters become
> > > > > irrecognizable, like this
>
> > > > > ã‚°ãƒ¼ã‚°ãƒ«ã ®æœ€æ–°ã ®ãƒ‡ãƒ¼ã‚¿ã‚»ãƒ³ã‚¿ãƒ¼ã ¯é žå¸¸è­˜ã ªã »ã ©é
> > > > > €²åŒ–㠗㠦㠄る ï¼  Blog on Publickey
>
> > > > > I read the django documentation it says django handles the coding
> > > > > automatically, but apparently this is not the case. Could anyone tell
> > > > > me what could wrong, is it the problem of the database of the django
> > > > > setting or other problem?
>
> > > > > Any help would be appreciated. Thanks in advance.
> > > > > -Larry
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to