Forums

problem with django social_auth

there: kerniexvid.pythonanywhere.com, and there Vkontakte-oauth2

Warning at /complete/vkontakte-oauth2/ Incorrect string value: '\xD0\xA1\xD0\xB0\xD0\xB2...' for column 'first_name' at row 1

some kind of utf8 encoding problem?

the same things on localhost is fine

the part of code from vk.html:

VK.Auth.login(function(response) {
var params = "";
if (response.session) {
    params = "first_name=" + encodeURI(response.session.user.first_name)+"&last_name="+encodeURI(response.session.user.last_name);
params += "&nickname=" + encodeURI(response.session.user.nickname) + "&id=" +encodeURI(response.session.user.id);
}
window.location = "{{ VK_COMPLETE_URL }}?" + params;
});

Right, that definitely sounds like a unicode encoding issue. Would you mind if I took a look at your databases? If so, just let me know which database and table is involved. If you'd rather not post anything publicly, just send us a message directly using the "Feedback" link and we can sort it out over email.

Thank you, that was really a database's thing; i forgot when adding registration it's tables latin1; solution:

alter table <some_table> convert to character set utf8 collate utf8_unicode_ci;

Great, glad you fixed it and thanks for posting the solution here!