Re: How to make django's mysql connections to use utf8mb4 ?
There is some discussion on this ticket:
-- 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 Norse <rahmcoff@radio1190.org> wrote:
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
-- Peter of the Norse--To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Django users" group.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+unsubscribe@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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home