aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: files with unicode names are not shared  (Read 7581 times)

Morse

  • Full Member
  • ***
  • Karma: 6
  • Offline Offline
  • Posts: 105
files with unicode names are not shared
« on: June 22, 2008, 08:37:39 PM »

my "incoming" folder contains 6 files, and 2 of them are with unicode (russian) names. In amule "shared files" there are only english ones, and amule says "total shared: 4 files"

all six files were there before amule installation. Refresh button doesn't help.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: files with unicode names are not shared
« Reply #1 on: June 22, 2008, 10:39:11 PM »

Are you using aMule 2.2.1 ?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Morse

  • Full Member
  • ***
  • Karma: 6
  • Offline Offline
  • Posts: 105
Re: files with unicode names are not shared
« Reply #2 on: June 22, 2008, 10:54:42 PM »

Yes.
i installed this
http://packman.links2linux.org/package/amule

Moreover, the search for unicode-named files doesn't work as well. May be there is some switch for unicode or something like that, because amuled seems to be totally unfamiliar with it.
« Last Edit: June 22, 2008, 11:01:37 PM by Morse »
Logged

Morse

  • Full Member
  • ***
  • Karma: 6
  • Offline Offline
  • Posts: 105
Re: files with unicode names are not shared
« Reply #3 on: July 04, 2008, 07:46:35 PM »

Any clues about this problem? I can't find a single file with non-english name.
Logged

Anarconda

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: files with unicode names are not shared
« Reply #4 on: July 05, 2008, 11:45:31 AM »

Same problem here with 2.2.1 and aMule-SVN both compiled with '--enable-nls'

Files are downloaded as expected, saved in 'Incoming' like Unknown ... Unknown(n) and when they are renamed to the proper name are not shared.

TIA.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: files with unicode names are not shared
« Reply #5 on: July 05, 2008, 01:27:24 PM »

You may want to review your locale settings.
Logged

Anarconda

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: files with unicode names are not shared
« Reply #6 on: July 05, 2008, 01:30:42 PM »

You may want to review your locale settings.

[amarcord@Gaia ~]$ locale
LANG=es_ES.utf8
LC_CTYPE="es_ES.utf8"
LC_NUMERIC="es_ES.utf8"
LC_TIME="es_ES.utf8"
LC_COLLATE=C
LC_MONETARY="es_ES.utf8"
LC_MESSAGES="es_ES.utf8"
LC_PAPER="es_ES.utf8"
LC_NAME="es_ES.utf8"
LC_ADDRESS="es_ES.utf8"
LC_TELEPHONE="es_ES.utf8"
LC_MEASUREMENT="es_ES.utf8"
LC_IDENTIFICATION="es_ES.utf8"
LC_ALL=

and glibc locales are:

en_US ISO-8859-1 
es_ES.UTF-8 UTF-8 
es_ES ISO-8859-1 
es_ES@euro ISO-8859-15 


Is this wrong? TIA.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: files with unicode names are not shared
« Reply #7 on: July 06, 2008, 12:03:48 AM »

how are you running your daemon, from a init script?
Logged

Anarconda

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: files with unicode names are not shared
« Reply #8 on: July 06, 2008, 09:26:50 AM »

how are you running your daemon, from a init script?

Yes. This one:

=================
#!/bin/bash

if [ "$(id -u)" != 0 ]
then
   echo "You must be root to start aMule as daemon."
   exit 2
fi

# general config
USECOLOR="YES"
. /etc/conf.d/amule.conf
. /etc/rc.d/functions

if [ -z $AMULEUSER ]
then
   echo "Unable to run aMule. You must set the user in /etc/conf.d/amule.conf."
   exit 2
elif [[ $AMULEUSER == "root" ]]
then
   echo "Unable to run aMule. You must not run aMule as root."
   exit 2
fi

confdir=$(su -l $AMULEUSER -c "echo ~")/.aMule
logfile=$(su -l $AMULEUSER -c "echo ~")/.aMule/amuled.log
lockfile=$(su -l $AMULEUSER -c "echo ~")/.aMule/muleLock

PID=`pidof -o %PPID /usr/bin/amuled`

[ -f $logfile ] && rm -f $logfile

case "$1" in
    start)
        stat_busy "Starting aMule"
   
   if [ -f $lockfile ]
   then
      stat_fail
      echo "Unable to run aMule, it is already running. If you're sure aMule is not already running, you can remove ${lockfile}."
      exit 2
   fi
   
   [ ! -d $confdir ] && su -l $AMULEUSER  -c "mkdir -p $confdir"

   [ -z "$PID" ] && su -l $AMULEUSER -c "/usr/bin/amuled -o &> $logfile &"
   
   i=0

   while [ "$i" -lt 20 ]
   do
      if [ ! -z "$(grep "No other instances are running." $logfile)" ]
      then
         add_daemon amule
         stat_done
         exit 0
      elif [ ! -z "$(grep "There seems to be an instance of aMule already running" $logfile)" ]
      then
         stat_fail
         exit 2
      else
         i="$(($i+1))"
      fi
   sleep 1
   done
   stat_fail
        ;;
    stop)
        stat_busy "Stopping aMule"
   if [ -f $lockfile ]
   then
      [ ! -z "$PID" ]  && kill $PID &> /dev/null
   else
      stat_fail
      echo "Unable to stop aMule. It is not running."
      exit 2
   fi
        if [ $? -gt 0 ]; then
            stat_fail
        else
            rm_daemon amule
            stat_done
        fi
        ;;
    restart)
        $0 stop
   sleep 1
        $0 start
        ;;
    *)
        echo "usage: $0 {start|stop|restart}"
   ;;
esac
exit 0

=============

The file amule.conf contains only  this:


AMULEUSER="amarcord"

Logged

Anarconda

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: files with unicode names are not shared
« Reply #9 on: July 06, 2008, 09:29:57 AM »

I almost forgot. The file /etc/rc.d/functions contains:

#
# initscripts functions
#

# width:

STAT_COL=$(/bin/stty size)
# strip the rows number, we just want columns
STAT_COL=${STAT_COL##* }
if [ "$STAT_COL" = "0" ]; then
   # if output was 0 (serial console), set default width to 80
   STAT_COL=80
elif [ ! -t 1 ]; then
   # disable color on output to non-tty
   STAT_COL=80
   USECOLOR=""
fi
# we use 13 characters for our own stuff
STAT_COL=$(($STAT_COL - 13))

# disable colors on broken terminals
TERM_COLORS="$(/bin/tput colors 2>/dev/null)"
if [ $? = 3 ]; then
   TERM_COLORS=8
elif [ -n "${TERM_COLORS}" ]; then
   case "${TERM_COLORS}" in
      *[!0-9]*)
         USECOLOR=""
         ;;
      *)
         [ "${TERM_COLORS}" -lt 8 ] && USECOLOR=""
         ;;
   esac
else
   USECOLOR=""
fi
unset TERM_COLORS

# colors:
if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then
   C_MAIN="\033[1;37;40m"      # main text
   C_OTHER="\033[1;34;40m"     # prefix & brackets
   C_SEPARATOR="\033[1;30;40m" # separator

   C_BUSY="\033[0;36;40m"      # busy
   C_FAIL="\033[1;31;40m"      # failed
   C_DONE="\033[1;37;40m"      # completed
   C_BKGD="\033[1;35;40m"      # backgrounded

   C_H1="\033[1;37;40m"        # highlight text 1
   C_H2="\033[1;36;40m"        # highlight text 2

   C_CLEAR="\033[1;0m"
fi

if [ -t 1 ]; then
   SAVE_POSITION="\033[s"
   RESTORE_POSITION="\033[u"
   DEL_TEXT="\033[$(($STAT_COL+4))G"
fi

# prefixes:

PREFIX_REG="::"
PREFIX_HL=" >"

# functions:

deltext() {
   printf "${DEL_TEXT}"
}

printhl() {
   printf "${C_OTHER}${PREFIX_HL} ${C_H1}${1}${C_CLEAR} \n"
}

printsep() {
   printf "\n${C_SEPARATOR}   ------------------------------\n"
}

stat_bkgd() {
   printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} "
   deltext
   printf "   ${C_OTHER}[${C_BKGD}BKGD${C_OTHER}]${C_CLEAR} "
}

stat_busy() {
   printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} "
   printf "${SAVE_POSITION}"
   deltext
   printf "   ${C_OTHER}[${C_BUSY}BUSY${C_OTHER}]${C_CLEAR} "
}

stat_append() {
   printf "${RESTORE_POSITION}"
   printf "${C_MAIN}${1}${C_CLEAR}"
   printf "${SAVE_POSITION}"
}

stat_done() {
   deltext
   printf "   ${C_OTHER}[${C_DONE}DONE${C_OTHER}]${C_CLEAR} \n"
}

stat_fail() {
   deltext
   printf "   ${C_OTHER}[${C_FAIL}FAIL${C_OTHER}]${C_CLEAR} \n"
}

stat_die() {
   retval=1
   [ "$1" = "" ] || retval=$1
   stat_fail
   exit $retval
}

status() {
   stat_busy "$1"
   shift
   $* >/dev/null 2>&1
   if [ $? -eq 0 ]; then
      stat_done
      return 0
   else
      stat_fail
      return 1
   fi
}

# daemons:

add_daemon() {
   [ -d /var/run/daemons ] || /bin/mkdir -p /var/run/daemons
   /bin/touch /var/run/daemons/$1
}

rm_daemon() {
   /bin/rm -f /var/run/daemons/$1
}

ck_daemon() {
   [ -f /var/run/daemons/$1 ] && return 1
   return 0
}

ck_depends() {
   for daemon in $@; do
      if ck_daemon $daemon; then
         /etc/rc.d/$daemon start
      fi
   done
}

source_functions() {
   if [ -d /etc/rc.d/functions.d/ ]; then
      for f in $(/bin/ls /etc/rc.d/functions.d/); do
         . /etc/rc.d/functions.d/$f
      done
   fi
}

# End of file
# vim: set ts=2 noet:
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: files with unicode names are not shared
« Reply #10 on: July 06, 2008, 02:07:24 PM »

I didn't read it, but if you're running from a inint script I've heard of people that found out that aMule was being launched BEFORE the locale settings were up. You may want to review that.
Logged

Anarconda

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: files with unicode names are not shared
« Reply #11 on: July 06, 2008, 02:51:13 PM »

I didn't read it, but if you're running from a inint script I've heard of people that found out that aMule was being launched BEFORE the locale settings were up. You may want to review that.

This is not the case. Here it's true I have a initscript but it is NOT launched when system starts cause I always run aMule in command line.

BTW, what is the difference between run amuled with -f or -o parameter?. I'm running aMule with -o but I can't understand what means -f (--full-daemon).

TIA.
Logged

Anarconda

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: files with unicode names are not shared
« Reply #12 on: July 06, 2008, 04:47:03 PM »

More confusion, at least to me. I removed amule-SVN from my system and I installed 2.2.1 with GUI (I was using amuled) and after a little while (program was hashing)  the files with unicode name are there.
Logged

dissociative

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: files with unicode names are not shared
« Reply #13 on: July 19, 2008, 04:19:05 AM »

I have the same problem with amuled from version 2.2.1, I dont know what should I do, the unicode filenames are shared fine by the monolithic build but they are not for amuled, here's the configure options used for the build that I'm using from config.log

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/man --disable-debug --enable-shared --with-crypto-prefix=/home/dissociative/tmp/cryptopp552 --enable-amulecmd --enable-amule-daemon --enable-webserver --enable-geoip --disable-nls --enable-verbose

and I have in my .profile export LANG=en_US.utf8

help please!!!!
« Last Edit: July 19, 2008, 04:21:07 AM by dissociative »
Logged

Anarconda

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: files with unicode names are not shared
« Reply #14 on: July 24, 2008, 02:03:02 PM »

I don't know if this help you but this a typical situation here:

2008-07-24 01:48:27: Hasher: Starting to create MD4 and AICH hash for file: 006.part
2008-07-24 01:52:47: Suspending upload of file: 2308F83D39841D357C97D677DCFE37BE
2008-07-24 01:52:47: ThreadScheduler: Completed task 'Hashing - /mnt/sdb1/Temp/006.part', 0 tasks remaining.
2008-07-24 01:52:48: PartFiles: WARNING: The filename 'Georges Méliès - First Wizard of Cinema vol.4 - Star Films 909-1325 (1907-1908).avi' is invalid and has been renamed to 'Unknown'.
2008-07-24 01:52:48: ThreadScheduler: Completed task 'Completing - /mnt/sdb1/Temp/006.part.met', 1 tasks remaining.
2008-07-24 01:52:48: Resuming uploads of file: 2308F83D39841D357C97D677DCFE37BE
2008-07-24 01:52:48: Finished downloading: Unknown
2008-07-24 01:52:48: ThreadScheduler: Completed task 'AICH Syncronizing', 0 tasks remaining.

That file was downloaded perfectly and was shared in the meanwhile but when download was over renamed to Unknown and never again shared.

I hope to make myself clear.  TIA.
Logged
Pages: [1] 2