LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-05-2011, 12:36 PM   #1
aronnok
Member
 
Registered: Oct 2004
Location: Dhaka, Bangladesh
Distribution: Redhat Linux 7.2,Redhat Linux 8.0,Redhat Linux 9.0
Posts: 36

Rep: Reputation: 15
File name containing Danish / Norwegian characters being renamed automatically.


Hi,
I have a Linux FTP server (Red Hat Enterprise Linux Server release 5.6 (Tikanga)).
Proftpd version : proftpd-1.3.3c-1.el5
Installed with mysql support.
This is also configured with mod_lang

We have some Scandinavian clients. Sometimes they upload files with special characters like "" "" etc.. We have found that when the clients upload files with special characters, it's getting automatically renamed. We have identified that "" is being renamed to "_"

I have my first proftpd.conf file at /etc/proftpd.conf
This file basically calls other individual config files. I have 3 FTP servers configured there.

I have the following parameter to support languages "UseEncoding on"

# grep Encoding /etc/proftpd* -R
/etc/proftpd/ifas_swe.conf:UseEncoding on
/etc/proftpd/ifas_no.conf:UseEncoding on
/etc/proftpd/ifas_swe.conf.old:UseEncoding off
/etc/proftpd/ifas_dk.conf:UseEncoding on
/etc/proftpd.conf:UseEncoding off
(last one is off as a tryout)

Funny thing is, i can see the special characters in the FTP client softwares. But when I access the directory through terminal, everything changes.

For a test I have uploaded two files named "pic 3.jpg" & "pic 4.jpg" and in the ftp server through terminal I can see them as "_pi_c_ 3.jpg" & "__p_i_c __4.jpg".

Just to provide more information:

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


How do I make sure that the files with Special Characters will not be renamed so that my clients are not harmed.

Do I need to change the Environment Directives like the Language settings?

Any help in this regard would be highly appreciated.
 
Old 10-06-2011, 09:29 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,111

Rep: Reputation: 218Reputation: 218Reputation: 218
Hi

In Scandinavia, most people's computers use UTF-8. But older computer systems use ISO-8859-1. All the letters are in that encoding as well, and we used it before Unicode became common. There is nothing special about Scandinavia in this regard. For example German, French and Spanish all have a few extra letters. If you search on the problem, you'll get more answers if you use any of these languages.

I don't know much about proftp, but I searched it and found this page:

http://www.proftpd.org/docs/modules/mod_lang.html

As I understand it, if you use "UseEncoding on", you deny the FTP client the possibility to change it. If the client then sends them as ISO-8859-1, the result is incorrect UTF-8, which might the the problem.

I would try to not use "UseEncoding" at all. In the docs, its says "By default, the mod_lang will automatically discover the local character set, and will use UTF8 for the client character set. The module will also allow the use of UTF8 encoding to be changed by clients using the OPTS UTF8 command (as per RFC2640)".
 
  


Reply

Tags
characters, language, proftpd, rename


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inputting Norwegian (Danish/Swedish) characters in Gnome boomklever Linux - Desktop 1 04-04-2007 10:53 AM
Norwegian characters in mutt corwax Linux - Software 2 12-09-2005 09:46 AM
problems getting Norwegian characters to work in X hilde Debian 2 01-09-2004 05:24 PM
No norwegian characters bjojoi Linux - Software 1 12-02-2003 03:11 PM
norwegian characters in aterm eonix Fedora 0 11-24-2003 01:36 PM


All times are GMT -5. The time now is 03:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration