View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001621aMuleMiscpublic2010-08-25 16:412010-08-28 22:22
Reporteradaptee 
Assigned ToGonoszTopi 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product VersionSVN 
Target VersionFixed in Version2.3.1 
Summary0001621: ed2k links containing unicode characters will cause the filename to be truncated.
Description1). start amuled or amule

2). add the link below containing Chinese characters

    ed2k "ed2k://|file|??.cue|1953|4171a26ef43c8b44b7dcef10edffc9fc|/" [^]

3). in amule or amulegui, the filename is displayed as "??"?but not the expected "??.cue", i.e, the extension part is lost.

4). the same thing occurs with Japanese characters, such as :

    ed2k://|file|???????srt.rar|197745|689f984f34c72b237b7bffb99d792d60|/ [^]



Additional InformationSVN snapshot: 10273

wxgtk version: 2.8.11

Disto: archlinux

locale: zh_CN.UTF-8

filesystem: reiserfs

compilation parameter:

  ./configure --prefix=/usr \
              --mandir=/usr/share/man \
              --enable-cas \
              --enable-wxcas \
              --enable-amule-daemon \
              --enable-amulecmd \
              --enable-amule-gui \
              --enable-alc \
              --enable-alcc \
              --enable-webserver \
              --disable-debug \
              --enable-optimize \
          --enable-ccache \
          --enable-geoip \
              --enable-nls
TagsNo tags attached.
Fixed in Revision10274
Operating SystemLinux
Attached Files

- Relationships

-  Notes
(0003482)
adaptee (reporter)
2010-08-25 17:04

Oops, the bug report display all the Chinese and Japanese characters I have inputed as ? , making my report not that useful.

Anybody can show me how to get around this?

Or, just open below pages and try any ed2k links

http://www.verycd.com/topics/2733151/ [^]
http://www.verycd.com/topics/2734762/ [^]
(0003483)
adaptee (reporter)
2010-08-27 17:27
edited on: 2010-08-27 17:41

I guess I have found the root cause

// src/libs/common/StringFunctions.cpp

113 wxString UnescapeHTML(const wxString& str)
114 {
115 size_t len = str.length();
116 wxWritableCharBuffer buf = str.char_str(wxConvUTF8);
117
118 // Work around wxWritableCharBuffer's operator[] not being writable
119 char *buffer = (char *)buf;
120
121 size_t j = 0;
122 for (size_t i = 0; i < len; ++i, ++j) {
123 if (buffer[i] == '%' && (len > i + 2)) {
            ......
136 }
        ......
138
147 }

    The 'for' statement iterate by bytes, but variable 'len' is the number of unicode characters, which is often smaller than the number of corresponding utf-8 bytes . That will truncate filenames containing Chinese/Japanese characters.

(0003484)
GonoszTopi (administrator)
2010-08-28 22:22

Fixed. Thanks for the report.

- Issue History
Date Modified Username Field Change
2010-08-25 16:41 adaptee New Issue
2010-08-25 16:41 adaptee Operating System => Linux
2010-08-25 17:04 adaptee Note Added: 0003482
2010-08-27 17:27 adaptee Note Added: 0003483
2010-08-27 17:41 adaptee Note Edited: 0003483
2010-08-28 22:22 GonoszTopi Fixed in Revision => 10274
2010-08-28 22:22 GonoszTopi Note Added: 0003484
2010-08-28 22:22 GonoszTopi Assigned To => GonoszTopi
2010-08-28 22:22 GonoszTopi Status new => resolved
2010-08-28 22:22 GonoszTopi Resolution open => fixed
2010-08-28 22:22 GonoszTopi Build => 10273
2010-08-28 22:22 GonoszTopi Fixed in Version => 2.3.1


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker