fixed #18160 Auth - Unknown Encoding Error when syncdb #570

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

mitnk commented Dec 2, 2012

I mentioned this error with sqlite3 in the original post. But the other day, I re-encounter it on another Macbook with PostgreSQL. So I think we'd better fix this issue for the non-ascii locales env.

mitnk added some commits Dec 2, 2012

@mitnk mitnk fixed #18160 Auth - Unknown Encoding Error when syncdb
I mentioned this error with sqlite3. But the other day, I re-encounter it
on another Macbook with PostgreSQL. So I think we would better fix this
issue for the non-ascii locales env.
8df7f98
@mitnk mitnk Merge branch 'master' of https://github.com/django/django c6f8289

@apollo13 apollo13 commented on an outdated diff Dec 8, 2012

django/contrib/auth/tests/management.py
@@ -31,6 +31,11 @@ def test_simple(self):
management.get_system_username = lambda: 'joe'
self.assertEqual(management.get_default_username(), 'joe')
+ def test_unknown_encoding(self):
+ import locale
+ locale.getdefaultlocale = lambda: ("en_US", "x-mac-simp-chinese")
@apollo13

apollo13 Dec 8, 2012

Owner

You at least have to reset this at the end of the test to not leak this change into other tests (use try/finally)

Contributor

mitnk commented Apr 18, 2013

Is there still any thing block this pull request being merged?

cc @apollo13

Owner

apollo13 commented Apr 18, 2013

I've never ran into an issue like this so I can't test it. @jezdez has a mac book, he might be able to test and give some pointers. Also this PR currently isn't mergeable (according to the GH merge button)

Contributor

mitnk commented Apr 18, 2013

Yeah. I encountered twice on two different macbooks.

mitnk closed this May 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment