Ticket #2712 (closed patch: fixed)

Opened 3 years ago

Last modified 2 years ago

Duplicate groups appears

Reported by: rschnz Owned by: MarkDoliner
Milestone: 2.4.1 Component: ICQ
Version: 2.1.1 Keywords:
Cc:

Description

I have some groups with russian names (they're utf-8 internally). When I moved to pidgin 2.1.1 from 2.1.0 for each of that groups (except one in upper-case) there appeared a duplicate group with a broken name.

Suppose I have group named "Друзья", after installing and starting pidgin 2.1.1 there will be two groups - "Друзья" and "Р"С_С_Р·С_С_". If I delete the one with broken name it will apper again after reloading pidgin. If I delete it and install and run 2.1.0 there will be no groups with broken names.

Attachments

oscar_group_utf8.diff (1.4 kB) - added by yuralol 2 years ago.
oscar_group_utf8.2.diff (1.4 kB) - added by yuralol 2 years ago.
utf8_groups.patch (0.6 kB) - added by linvinus 2 years ago.
utf8_oscar.patch (1.0 kB) - added by linvinus 2 years ago.
updated authorization charset problem

Change History

  Changed 3 years ago by nomeata

I can confirm the bug here, having a group with a German umlaut (ä) in it.

  Changed 3 years ago by loptosko

I can confirm it too in 2.1.1 In 2.1.0 groups are correct

  Changed 3 years ago by private_lock

OK, I moved all contacts to a new group. Now I delete the bad spelled duplicate, but it will come back on restart. So I tried to delete the correct (and now empty) original, but it refuses to go away. Next I've renamed it. I still cannot delete it. Internally it somehow still has the old name. Consequentially, the bad spelled duplicate reapears again, though I have a renamed original group now.

Is there a way, to kill both of those empty groups?

BTW: It was not the cleverest of all things to move my ICQ-contacts, because each of them required authorisation again #1717

in reply to: ↑ description   Changed 3 years ago by acelerat

I have the same problem with russian groups((

  Changed 3 years ago by nomeata

Can the priority of this bug be raised? It seems to affect all international users and is pretty ugly. Thanks!

  Changed 2 years ago by rschnz

pidgin/2.2.0 has this problem too...

follow-up: ↓ 8   Changed 2 years ago by seanegan

  • pending changed from 0 to 1

Is this on ICQ?

in reply to: ↑ 7   Changed 2 years ago by rschnz

  • pending changed from 1 to 0

Replying to seanegan:

Is this on ICQ?

Yes. But I don't know if these groups would appear with another protocols. Sorry, I don't have contacts using jabber or msn, so I can't test it.

follow-up: ↓ 13   Changed 2 years ago by seanegan

  • status changed from new to closed
  • resolution set to duplicate

duplicate of #1645

  Changed 2 years ago by rschnz

Hmm :)) I don't this is a duplicate. #1645 is about showing away, authorisation and offline messages incorrectly, not about creating duplicate groups with broken names. This one first appeared in 2.1.1, and #1645 was always as I remember :-)

  Changed 2 years ago by seanegan

It's all caused by the same root bug: ICQ sucks at internationalization, and can't readily handle a system with a UTF-8 locale.

  Changed 2 years ago by private_lock

The empty *undeletable* group shows up on login to any protocoll (MSN, Jabber, Yahoo, AIM) The misspelled duplicate only appears with ICQ and only contained ICQ-contacts.

But I cannot delete both of them in Pidgin 2.2.0, even though they now don't have any contacts left inside.

in reply to: ↑ 9   Changed 2 years ago by acelerat

Replying to seanegan:

duplicate of #1645

It's not a duplicate, why you have closed this ticket?

  Changed 2 years ago by nomeata

It may be that ICQ sucks, but pidgin 2.1.0 did this correctly, so I hope that this bug can be fixed in pidgin...

  Changed 2 years ago by Seamas

I confirm this bug in winpidgin 2.1.1 and 2.2.0. In winpidgin 2.2.0 buddy groups with russian names duplicates on program start only when I use ICQ protocol. Groups, created with jabber (xmpp) account, do not duplicate.

  Changed 2 years ago by datallah

  • status changed from closed to reopened
  • resolution duplicate deleted

This appears to be a somewhat different issue than #1645 about behavior that changed between 2.1.0 and 2.1.1.

  Changed 2 years ago by datallah

  • component changed from pidgin (gtk) to ICQ

  Changed 2 years ago by loptosko

Please raise the priority of this bug! Thank you.

  Changed 2 years ago by UbuPetr

Hello, I have slightly different bug #3717.

  Changed 2 years ago by XCiber

I confirm this bug in pidgin 2.2.2 Please raise the priority of this bug! Thank you.

follow-up: ↓ 22   Changed 2 years ago by yuralol

If you change encoding. appear duplicate groups (only with international symbols) in blist.xml. Delete blist.xml and run pidgin with UTF-8. Sorry, I don't know English very well :(

in reply to: ↑ 21   Changed 2 years ago by XCiber

Replying to yuralol:

If you change encoding. appear duplicate groups (only with international symbols) in blist.xml. Delete blist.xml and run pidgin with UTF-8. Sorry, I don't know English very well :(

Thank You! It works! (Ничего. Я тоже с английским на Вы :-) )

  Changed 2 years ago by loptosko

Bug confirmed on Pidgin 2.3.0 / Windows Setting encoding to utf-8 and removing blist.xml fixes it.

I wonder if there is a possibility to make utf-8 a default setting.

  Changed 2 years ago by XCiber

utf-8 helps, but i have many troubles with Cyrillic (cp1251) users who use qup (or other alternative clients). I can't read those messages.

Changed 2 years ago by yuralol

Changed 2 years ago by yuralol

  Changed 2 years ago by yuralol

I think this bug is same #3717 and #3874. Please, try diff And delete oscar_group_utf8.2.diff is same diff :-)

  Changed 2 years ago by loptosko

I did some tests about icq encoding bugs in Pidgin 2.3.0 I was able to reproduce 2 bugs see: http://pastebin.com/f48ac1e24 Don't know if it is helpful

follow-up: ↓ 28   Changed 2 years ago by UbuPetr

I have some progress and partial solution for adding buddyes.

When you add new buddy, you must write the name of group from keyboard in the correct CP-1250 encoding, e.g. "Kamarádi". You must not choose prefered Pidgin "Kamarádi" (saved in blist.xml as "Kamarádi") in UTF-8 encoding. Windows pidgin encode this group to the UTF-8. When it encode CP-1250 group name, everything is OK. When it encode UTF-8 group name, this name will be encoded twice to the UTF-8 and malformaed group will be created on ICQ server "Kamarádi" (group "Kamarádi" has been there of course). But new group "Kamarádi" will appear in blist.xml (saved in blist.xml as "Kamarádi") - better bugs in blist.xml then on the ICQ server.

When Windows Pidgin download list of groups from the server, it encodes to the UTF-8 twice or downloads raw data (in UTF-8 of course) and puts them to the UTF-8 again. Linux Pidgin do not has this bug.

in reply to: ↑ 27   Changed 2 years ago by private_lock

Replying to UbuPetr:

Linux Pidgin do not has this bug.

Really? At least Pidgin 2.2.1 was not able to correctly handle the legacy blist.xml from Pidgin 2.1.0 and before. All of this in Kubuntu Feisty and Gutsy.

Finally I edited the blist.xml myself. Now both groups ... the correct including ä and the wrong missspelled group are gone. As I said above, they were already empty, so I assume the ICQ-server may not have been responsible any more for the zombie group.

  Changed 2 years ago by linvinus

i'm make patch (utf8_groups.patch) that resolve problem (before use it rename file ~/.purple/blist.xml for backup) in ubuntu gutsy with pidgin 2.3.1 work fine. And i suppouse that with windows should work too, but i can't test that :( ubuntu users may download packages from ftp://80.86.249.14/gaim/2.3.1 Sorry for English :(

Changed 2 years ago by linvinus

  Changed 2 years ago by elb

The patch on #3874 (a duplicate of this bug) may be relevant.

  Changed 2 years ago by evands

  • owner set to MarkDoliner
  • status changed from reopened to new

I'm not sure, but I think #3874's patch is more correct.

  Changed 2 years ago by MarkDoliner

  • type changed from defect to patch

follow-up: ↓ 36   Changed 2 years ago by MarkDoliner

  • status changed from new to closed
  • resolution set to fixed

I chose to apply the patch from revision 3874 instead of this one. I feel that patch will have less impact on other parts of the oscar protocol because it doesn't change the oscar_utf8_try_convert() function. But this should be fixed now in the repository. Sorry it took me so long to do something about this bug.

  Changed 2 years ago by Robby

A milestone?

  Changed 2 years ago by MarkDoliner

  • milestone set to 2.4.1

in reply to: ↑ 33   Changed 2 years ago by linvinus

Replying to MarkDoliner:

I chose to apply the patch from revision 3874 instead of this one. I feel that patch will have less impact on other parts of the oscar protocol because it doesn't change the oscar_utf8_try_convert() function. But this should be fixed now in the repository. Sorry it took me so long to do something about this bug.

Sorry i was in Egypt last week and can't enter in to discussion.

Patch 3874 resolve only boddy list (and group) problem, but not other places! it called 15 times in oscar.c!! So other places must be patched too. Also i don't understand why function called "oscar_utf8_(TRY)_convert" don't check is content already in UTF8? Because of that in oscar_user_info_convert_and_add_pair or purple_icqinfo information about icq user in Russian converted twice in to utf8

The same problem in purple_icqalias and oscar_buddycb_edit_comment

in purple_ssi_parseaddmod the same patch was added before!

if (g_utf8_validate(alias, -1, NULL))

alias_utf8 = g_strdup(alias);

else

alias_utf8 = oscar_utf8_try_convert(account, alias);

Also problem with incorrect codepage appear in field "Status" at About dialog, and in authorization dialog.

I really hope that we find the true! Russian Gnome users waiting for normal (gtk) icq client too long.

Authorization problem http://img235.imageshack.us/my.php?image=screenshotbuddylist3xy4.png

Status problem http://img85.imageshack.us/my.php?image=screenshotbuddyinformathk1.png

Sorry for English.

this is patch also resolve authorization problem

  Changed 2 years ago by linvinus

sorry with authorization i make mistake

the problem

$ env | grep LANG LANG=ru_RU.UTF-8 GDM_LANG=ru_RU.UTF-8 $ pidgin --debug .... (17:50:17) oscar: ssi: received authorization request from 294517883 (17:50:17) oscar: Parsing IM part, charset=0x0003, charsubset=0x0000, datalen=54 char set!!! charsetstr1=CP1251 charsetstr2=UTF-8 char set2!!! CP1251 data='Пожалуйста, авторизуйте меня!' len=54 fallback=0

as you can see charsetstr1=CP1251 but data in utf8 (this request send pidgin 2.3.1 (without my patches) ) So when called purple_plugin_oscar_convert_to_utf8() it convert data from urf8 to cp1251 that is wrong. That is why user see http://img235.imageshack.us/my.php?image=screenshotbuddylist3xy4.png

But simple test in purple_plugin_oscar_convert_to_utf8() if (g_utf8_validate(data, -1, NULL))

return g_strdup(data);

will not work if charset == UCS-2BE

(18:01:29) oscar: Parsing IM part, charset=0x0002, charsubset=0x0000, datalen=24 char set!!! charsetstr1=UCS-2BE charsetstr2=UTF-8 (18:01:29) pidgin-libnotify: notify(), new: title: 'rotanoved says:', body: '?@>AB>', buddy: 'rotanoved' (18:01:29) pidgin-libnotify: notify(), has a prpl icon. (18:01:29) g_log: purple_conversation_get_ui_ops: assertion `conv != NULL' failed

where '?@>AB>' == "просто текст"

so this is my decision in purple_plugin_oscar_convert_to_utf8()

- if (g_ascii_strcasecmp("UTF-8", charsetstr)) { +

+ if (g_ascii_strcasecmp("UTF-8", charsetstr)!=0 && ( g_ascii_strcasecmp("UCS-2BE", charsetstr)==0 !g_utf8_validate(data, datalen, NULL) ) ) {

Changed 2 years ago by linvinus

updated authorization charset problem

Note: See TracTickets for help on using tickets.