From mboxrd@z Thu Jan 1 00:00:00 1970 From: OGAWA Hirofumi Subject: Re: msdos filesystem ignores codepage argument? Date: Mon, 29 Dec 2014 02:00:46 +0900 Message-ID: <87zja7so8x.fsf@devron.myhome.or.jp> References: <549DE622.6050504@ubuntu.com> Mime-Version: 1.0 Content-Type: text/plain Cc: linux-fsdevel To: Phillip Susi Return-path: Received: from mail.parknet.co.jp ([210.171.160.6]:47289 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751838AbaL1RAu (ORCPT ); Sun, 28 Dec 2014 12:00:50 -0500 In-Reply-To: <549DE622.6050504@ubuntu.com> (Phillip Susi's message of "Fri, 26 Dec 2014 17:50:10 -0500") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Phillip Susi writes: > I'm investigating a bug report about the msdos filesystem and the fact > that it appears to ignore the codepage argument. The user wants to > use msdos instead of vfat to avoid adding long filenames to the fs and > store the short filenames using code page 850. I verified that when > the on disk directory entry contains 0x8E, which is an umlouted A in > cp850, but when mounting with mount -t msdos no matter what codepage I > specify in -o, ls outputs the raw 0x8E rather than using the specified > codepage to translate the on disk string to utf8. The msdos > filesystem refuses to accept the utf8 or iocharset options, so how do > you get it to do correct translation using the specified codepage? codepage option is to specify what codepage is used as on-disk encode in FAT, not how convert to encoding to show. And msdos driver doesn't have the feature to encoding conversion between on-disk and user (codepage is used only to upper/lower case conversion basically). IOW, msdos assumes the user and on-disk encodings are same. > Also in the process I noticed some odd behavior of ls. If I set my > terminal to use cp850 and ls | cat, I see the umlouted A, but without > piping the output through cat, it comes out as a question mark. Why > is that? It is what "ls" does. Probably, following option will show raw string $ ls -N --show-control-chars Thanks. -- OGAWA Hirofumi