LinuxQuestions.org
Review your favorite Linux distribution.
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 09-25-2012, 05:07 AM   #1
okok
Member
 
Registered: Jan 2002
Posts: 100

Rep: Reputation: 15
How to rename files with "Invalid or incomplete multibyte or wide character" in name?


I have a large number of files whose names contain all sorts of accents: , etc. In most applications I can use them without problem, but when I was trying to copy them to an NTFS drive, I got messages such as

Error opening file: 'filename_with__or__.txt' Invalid or incomplete multibyte or wide character.

When I remove those accented charcters from the filenames the problem is sovled. However, I have a very large number of those files, and the obvious solution (since I am not knowledgeable enough in command-line operations), to use a tool such as pyRenamer and replace those characters with accent-less characters fails. In pyRenamer's internal display those characters are displayed as something like [x]. I tried also simple command-line renaming commands, but could not get the desired result.

I'd appreciate both explanations on why I get this problem, and how to fix it (either by preserving the current names, with the accents, or by replacing them).
 
Old 09-25-2012, 05:21 AM   #2
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 609

Rep: Reputation: 180Reputation: 180
You're probably not using an UTF-8 locale both in pyRenamer and for your NTFS mount.
Check your locale settings with
Code:
locale
You can force a locale when mounting NTFS filesystem with ntfs-3g using the mount option locale=LOCALE (i.e. locale=en_US.utf8), although that's not a recommended option as you should use the same locale you're using on your system. Read this thread for some relevant info.
 
Old 09-25-2012, 06:59 AM   #3
okok
Member
 
Registered: Jan 2002
Posts: 100

Original Poster
Rep: Reputation: 15
Thanks. The Debian UTF-8 Migration tool turned out to be a simple and complete solution to this problem. It changed my locale to UTF-8 and made the necessary changes to file names.
 
  


Reply

Tags
filenames, incomplete multibyte, invalid filename, rename, wide character


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
rsync: "Invalid or incomplete multibyte or wide character (84)" don_wombat_73 Linux - Newbie 4 05-14-2013 03:10 PM
[SOLVED] Invalid or incomplete multibyte or wide character ?? mgai7755 Linux - Newbie 6 05-16-2011 10:39 AM
Samba/Kerberos : ads_connect: Invalid or incomplete multibyte or wide character Lordandmaker Linux - Networking 0 04-01-2008 06:03 AM
"Invalid or incomplete multibyte.." using cat textfile | mailx recipient@domain pargilo Linux - Software 0 04-01-2006 06:58 AM
Invalid or incomplete multibyte or wide character chanys Linux - General 1 03-13-2003 11:09 PM


All times are GMT -5. The time now is 02:44 PM.

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