Upload log file is encoded to utf8 twice

Bug #461733 reported by crazybrake
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LinuxDC++
New
Undecided
Unassigned

Bug Description

when I read the Upload log file I see that conversion from hub encoding to utf8 is made twice.

then user has to make "cat .dc++/log/Upload.log | iconv -f utf8 | iconv -f utf8" to see file contents.

debian/sid
linuxdcpp v.1.0.3, core version 0.698

hub encoding: cp1251, locale: ru_RU.KOI8-R.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

When you say the file is encoded twice, what part of the file do you mean? The whole thing or just certain fields? Nick field? Filename? Both? I would think only filename or nick could have encoding problems since the rest is ASCII.

And just to confirm that when you say locale ru_RU.KOI8-R it is the value printed by `locale | grep CTYPE`?

I did some tests and was unable to reproduce your issue. I uploaded some files that had non-ASCII characters in them to a user that had non-ASCII characters in their name and the log file showed both correctly. As far as I can tell, the filename in the log should be utf8. The filename should be converted from the filesystem encoding to utf8 when hashed, then retrieved by the logger without any additional conversion.

Changed in linuxdcpp:
status: New → Incomplete
Revision history for this message
crazybrake (crazybrake) wrote :

both: nick and filename are encoded twice.

$ locale | grep CTYPE
LC_CTYPE="ru_RU.KOI8-R"

btw, the Download.log has the same problem.

Changed in linuxdcpp:
status: Incomplete → New
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Are you running with a hardcoded locale (e.g. `LC_CTYPE=ru_RU.CP1251 linuxdcpp`)? Check your menu launcher to confirm? As we saw in bug #480898, that can cause multiple encoding issues.

Revision history for this message
crazybrake (crazybrake) wrote :

no. I'm running linuxdcpp from command line. LC_TYPE is not set.
but LANG=ru_RU.KOI8-R is defined.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Why do you manually specify LANG? Can you please try without?

Revision history for this message
crazybrake (crazybrake) wrote :

why manually? it's set in my working profile.
and why not?

i tried to run linuxdcpp without any LANG/LC_ environment vars and
i cannot even define encoding in log files: it is not utf8 nor cp1251.

btw, without LANG linuxdcpp after 1-2 minutes is always crashed with segfault.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.