Ticket #1418 (reopened defect)

Opened 23 months ago

Last modified 7 weeks ago

"error encoding" message

Reported by: xammu@… Owned by: root_42
Priority: normal Milestone: 1.3.5
Component: qt/kde gui Version: 1.3.4
Keywords: encoding locale Cc:

Description

hi
I use licq 1.3.4 with qt-plugin 1.3.4.
I become the message "error encoding UTF-16 from UTF-8" when i send a message with german chars (ÖÄÜ).
UTF-8 are the system default.

This problem exist since licq 1.3.2., but the message before was ""error encoding UTF-16 from".

Debian Sid
KDE 3.5.5

Attachments

upgrade.txt (45.8 kB) - added by xammu@… 23 months ago.
upgrade

Change History

follow-ups: ↓ 2 ↓ 10   Changed 23 months ago by erijo

  • milestone set to 1.3.5

(Duplicate ticket in #1414.)

  1. What output do you get when you run the locale command?
  2. Which encoding have you selected in Licq (if any)?
  3. Have you selected any special encoding for the contact you're chatting with?
  4. Do you know which encoding the contact uses (client, operating system)?

in reply to: ↑ 1 ; follow-up: ↓ 3   Changed 23 months ago by xammu@…

Replying to erijo:

(Duplicate ticket in #1414.)
1. What output do you get when you run the locale command?

renfle@lcars:~$ locale
LANG=de_DE.UTF-8
LANGUAGE=de_DE:de:en_GB:en
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

1. Which encoding have you selected in Licq (if any)?

UTF-8

1. Have you selected any special encoding for the contact you're chatting with?

No

1. Do you know which encoding the contact uses (client, operating system)?

User1: ICQ5.1, Windows XP, ISO-8859-15(?)
User2: Unknow, a MacOSX Client, UTF-8

I also recognized: the message comes when receiver is online, if receiver is offline no message appears.

(sorry for bad english :| )

in reply to: ↑ 2 ; follow-up: ↓ 5   Changed 23 months ago by emostar

Replying to xammu@securersa.de:

1. Have you selected any special encoding for the contact you're chatting with?

No

Try selecting UTF-8 from the codec menu of that user. It is the 'ABC' button in the chat window.

  Changed 23 months ago by erijo

Another duplicate in #1424.

Kopete is having similar problems: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=394080

in reply to: ↑ 3   Changed 23 months ago by xammu@…

Replying to emostar:
I making apt-get upgrade && apt-get dist-upgrade in Debian.
It seems that the problem is solved. Since upgrade no more message appears.

follow-up: ↓ 7   Changed 23 months ago by erijo

Could you please report which packages got upgraded (/var/log/dpkg.log should be helpful) so we can see if this was a known problem in some package?

Changed 23 months ago by xammu@…

upgrade

in reply to: ↑ 6   Changed 23 months ago by xammu@…

Replying to erijo:

Could you please report which packages got upgraded (/var/log/dpkg.log should be helpful) so we can see if this was a known problem in some package?

i make a
"cat /var/log/dpkg.log | grep 2006-10-18 | grep upgrade > upgrade.txt"
see "update.txt" in Attachments

  Changed 23 months ago by root_42

  • owner set to root_42

It seems that this is caused by broken locale settings of the machine licq is running on. German users should try to set LC_ALL to de_DE@euro. scotch on IRC reported thatt this fixes the problem. Can anyone try this out?

  Changed 23 months ago by flynd

I have the same problems with swedish characters (åäö).
The problem only happens when chatting with some of my friends, I think it is related to which client the peer is using. I'm seeing the problem with trillian but not with miranda or gaim. This applies to messages sent through server as send direct sometimes caused trillian to crash so I'm not sending direct anymore. :-)
In 1.3.2 I managed to do a small hack that solved the problem for me but the same thing did not work in 1.3.4.
Below is my hack for 1.3.2:

diff -Naur licq-1.3.2/src/icqd-tcp.cpp licq-1.3.2-flynd/src/icqd-tcp.cpp --- licq-1.3.2/src/icqd-tcp.cpp 2005-07-22 18:05:03.000000000 +0200 +++ licq-1.3.2-flynd/src/icqd-tcp.cpp 2005-10-22 00:27:51.000000000 +0200 @@ -118,6 +118,10 @@

bUTF16 = true; if (szFromEncoding == 0)

szFromEncoding = strdup("UTF-8");

+if(strcmp(szFromEncoding, "") == 0) { + free(szFromEncoding); + szFromEncoding = strdup("ISO8859-1"); +}

szMessage = gTranslator.ToUTF16(mDos, szFromEncoding, nUTFLen); free(szFromEncoding);

}

in reply to: ↑ 1 ; follow-up: ↓ 11   Changed 22 months ago by mrb

I too can confirm this bug, at least with 1.3.2 and 1.3.4 in FreeBSD portage, although it might be caused by something different than what the posters above see.

I can use german umlauts but only if the other user has written something before. If I initiate the chat or the conversation with the other user has been idle for some time everything after the first umlaut is truncated and I receive the encoding error message. Umlauts do work for me after receiving the first message of a user until there appears to be a timeout. "Send through server" is checked for most contacts.

2. Which encoding have you selected in Licq (if any)?

ISO 8859-1, also tried with UTF-8 and UTF-16

3. Have you selected any special encoding for the contact you're chatting with?

No. Tried every single special encoding but no change.

4. Do you know which encoding the contact uses (client, operating system)?

Mostly latest official client on Windows, but also had trouble with Linux clients (no idea which ones)

My locale is not set properly, although it did not work after setting it to a german locale as advised above.

mrb@chaos$ locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=de_DE@euro

in reply to: ↑ 10   Changed 22 months ago by erijo

Replying to mrb:

I too can confirm this bug, at least with 1.3.2 and 1.3.4 in FreeBSD portage, although it might be caused by something different than what the posters above see.

What output do you get after running: locale charmap . If it's something like ANSI_X3.4-1968 then your problem is with your locales. The following should fix the problem:

First run locale -a to see which locales you have available. For you, this should include something like de_DE. Then run unset LC_ALL && export LC_CTYPE=de_DE . Now, when you run locale charmap the output should be ISO-8859-1 or UTF-8 (not ANSI_X3.4-1968). To test this, start Licq from this terminal and see if the problem is gone or not.

Please report back if this works, or don't work, for you.

  Changed 22 months ago by mrb

As advised I set LC_CTYPE to an appropriate german type and locale charset now shows ISO8859-1. Right now there aren't many people online but I couldn't reproduce my issues above any longer.

I hope this isn't stated somewhere in the docs or was just plain obvious or I'll go stand in the corner and feel ashamed like I probably should. Although licq was the only application having issues with my locale settings. If this actually was connected to the original bug report feel free to ask me for further testing.

  Changed 11 months ago by flynd

  • keywords encoding locale added
  • status changed from new to closed
  • resolution set to fixed

Closing this ticket as the problem seems to go away with proper locale settings together with the latest svn version.

  Changed 10 months ago by Yando

  • status changed from closed to reopened
  • resolution fixed deleted

  Changed 10 months ago by Yando

The problem is still there. yando@RoverBook:~> locale LANG=ru_RU.UTF-8 LC_CTYPE="ru_RU.UTF-8" LC_NUMERIC="ru_RU.UTF-8" LC_TIME="ru_RU.UTF-8" LC_COLLATE="ru_RU.UTF-8" LC_MONETARY="ru_RU.UTF-8" LC_MESSAGES="ru_RU.UTF-8" LC_PAPER="ru_RU.UTF-8" LC_NAME="ru_RU.UTF-8" LC_ADDRESS="ru_RU.UTF-8" LC_TELEPHONE="ru_RU.UTF-8" LC_MEASUREMENT="ru_RU.UTF-8" LC_IDENTIFICATION="ru_RU.UTF-8" LC_ALL=

LICQ v1.3.4

I use CP 1251 as a default coding and have the same message (Error encoding to UTF-16 from UTF-8). But i'm unable to figure out why does it happen. The thing is that this message may appear and also it may not even though i speak with the same person (same ICQ client, same coding). When this error begin to appear i switch in the dialog window from CP 1251 to UTF-8 and back and the message error appear no more, but i'm sure it's not the way it should work, you know...

  Changed 10 months ago by flynd

This should be fixed with Licq 1.3.5. Please upgrade and check if the problem remains.

Note: See TracTickets for help on using tickets.