Re: How to make django's mysql connections to use utf8mb4 ?
well, emo is emo. its not an excuse, I know.. being emotional is ok. I had a pritty tuff day like you guys, I don't know who to hug. I need an expression, any sugestions? ;D 2013 m. sausio 23 d., trečiadienis 21:07:07 UTC, Chen Xu rašė: > > I saved some Emoji icons to MySQL Database,the icons have been saved > correctly. Since I can see them from MySQL Shell when I type 'select > message_text from messages' > > However, when I do Message.object.get(ph=5).message_text, it shows me a > bunch question marks. > > Could someone please help? > > Thanks > > -- > ⚡ Chen Xu ⚡ > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to make django's mysql connections to use utf8mb4 ?
There is some discussion on this ticket: https://code.djangoproject.com/ticket/18392 The ticket also requires that a new version of MySQLdb be running to properly recognize the type. - Chris On Mon, Feb 18, 2013 at 4:22 PM, Peter of the Norsewrote: > Triple check your encoding type on the database and table. MySQL is > often stupid about encoding, and when Django tries to do the right thing, > it fails. I once converted a MySQL database from PHP to Django, and ran > into a similar problem. Everything on the old database was marked Latin1, > but web browsers were treating it as UTF-8. MySQL was more than happy to > store invalid data, but when it came time to view the data with Django, all > we got were random characters and question marks. They were trying to > convert Latin1 into UTF-8 and failing. phpMyAdmin did the wrong thing too. > > On 1/24/2013 12:59 AM, Adrián Espinosa wrote: > > Hello, > > I struggled with this once, although not through Django. I tried a lot of > things, and I couldn't get MySQL to properly store emojis, or > japanese/chinese characters for example. > > As my project was just starting, I switched to postgresql, and it just > worked. I did nothing fancy to get it to work and I have succesfully stored > all kind of characters. > > I'm also interested in the right solution for MySQL, but if you don't want > to spend a lot of time or anything else, you might want to try with > postgresql. > > Best regards > > On Wednesday, January 23, 2013 10:07:07 PM UTC+1, Chen Xu wrote: >> >> I saved some Emoji icons to MySQL Database,the icons have been saved >> correctly. Since I can see them from MySQL Shell when I type 'select >> message_text from messages' >> >> However, when I do Message.object.get(ph=5).**message_text, it shows me >> a bunch question marks. >> >> Could someone please help? >> >> Thanks >> >> -- >> ⚡ Chen Xu ⚡ >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/XMNArBaFugEJ. > 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. > > > -- > Peter of the Norse > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to make django's mysql connections to use utf8mb4 ?
Triple check your encoding type on the database and table. MySQL is often stupid about encoding, and when Django tries to do the right thing, it fails. I once converted a MySQL database from PHP to Django, and ran into a similar problem. Everything on the old database was marked Latin1, but web browsers were treating it as UTF-8. MySQL was more than happy to store invalid data, but when it came time to view the data with Django, all we got were random characters and question marks. They were trying to convert Latin1 into UTF-8 and failing. phpMyAdmin did the wrong thing too. On 1/24/2013 12:59 AM, Adrián Espinosa wrote: Hello, I struggled with this once, although not through Django. I tried a lot of things, and I couldn't get MySQL to properly store emojis, or japanese/chinese characters for example. As my project was just starting, I switched to postgresql, and it just worked. I did nothing fancy to get it to work and I have succesfully stored all kind of characters. I'm also interested in the right solution for MySQL, but if you don't want to spend a lot of time or anything else, you might want to try with postgresql. Best regards On Wednesday, January 23, 2013 10:07:07 PM UTC+1, Chen Xu wrote: I saved some Emoji icons to MySQL Database,the icons have been saved correctly. Since I can see them from MySQL Shell when I type 'select message_text from messages' However, when I do Message.object.get(ph=5).message_text, it shows me a bunch question marks. Could someone please help? Thanks -- ⚡ Chen Xu ⚡ -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/XMNArBaFugEJ. 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. -- Peter of the Norse -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to make django's mysql connections to use utf8mb4 ?
Hello, I struggled with this once, although not through Django. I tried a lot of things, and I couldn't get MySQL to properly store emojis, or japanese/chinese characters for example. As my project was just starting, I switched to postgresql, and it just worked. I did nothing fancy to get it to work and I have succesfully stored all kind of characters. I'm also interested in the right solution for MySQL, but if you don't want to spend a lot of time or anything else, you might want to try with postgresql. Best regards On Wednesday, January 23, 2013 10:07:07 PM UTC+1, Chen Xu wrote: > > I saved some Emoji icons to MySQL Database,the icons have been saved > correctly. Since I can see them from MySQL Shell when I type 'select > message_text from messages' > > However, when I do Message.object.get(ph=5).message_text, it shows me a > bunch question marks. > > Could someone please help? > > Thanks > > -- > ⚡ Chen Xu ⚡ > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/XMNArBaFugEJ. 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.
How to make django's mysql connections to use utf8mb4 ?
I saved some Emoji icons to MySQL Database,the icons have been saved correctly. Since I can see them from MySQL Shell when I type 'select message_text from messages' However, when I do Message.object.get(ph=5).message_text, it shows me a bunch question marks. Could someone please help? Thanks -- ⚡ Chen Xu ⚡ -- 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.