[SOLVED] How to rename files with "Invalid or incomplete multibyte or wide character" in name?
Linux - GeneralThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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).
You're probably not using an UTF-8 locale both in pyRenamer and for your NTFS mount.
Check your locale settings with
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.