FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Sun Jun 13, 2021 12:26



Post new topic Reply to topic  [ 3 posts ] 
Lowercasing problem on lowntfs filldir 
Author Message

Joined: Mon Jun 11, 2012 22:44
Posts: 7
Post Lowercasing problem on lowntfs filldir
Hi,

When displaying the file names for an image, there are issues displaying the lowercase letters. For example, the folder 'System Volume Information' is being displayed as 'ſystem volume information'.

The character ſ maps to the uppercase character S, as does s obviously. However, the way the function ntfs_locase_table_build builds the lowercase table, the ſ mapping overwrites the s mapping. I was able to confirm this by changing the direction the table is built, which resolved this particular problem.

unistr.c
Code:
1297c1297
<               for (i=0; i<uc_cnt; i++) {
---
>               for (i=uc_cnt-1; ; i--) {
1300a1301,1302
>                       if (i == 0)
>                               break;


However, that 'fix' of mine doesn't solve the underlying problem. The issue here is that there is not a single unique lowercase letter for each uppercase letter (http://www.unicode.org/faq/casemap_charprop.html#10). This is likely why NTFS includes a table to map lowercase characters to uppercase but not the other way around.

Unfortunately, I am not able to replicate this behavior on anything other than this single image. Seeing as the patch above did show the right character, I'm surprised this problem doesn't happen all the time when using ignore_case.

Thanks,
Nick


Fri Jul 19, 2013 20:47
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Lowercasing problem on lowntfs filldir
Hi,

Quote:
The character ſ maps to the uppercase character S, as does s obviously. However, the way the function ntfs_locase_table_build builds the lowercase table, the ſ mapping overwrites the s mapping. I was able to confirm this by changing the direction the table is built, which resolved this particular problem.

This is definitely not the case with plain latin characters if your original upper case table is correct.

Please compute the md5 of your upper case table, by :
Code:
# as root, replacing Mountpoint by relevant mount point
# keep the quotes or escape the $
md5sum '/Mountpoint/$UpCase'

The correct values depends on how you formatted to partition. Known correct values are :
WinXP : 6fa3db2468275286210751e869d36373
Vista : 2f03b5a69d486ff3864cecbd07f24440
Win8 and recent Win7 : 7ff498a44e45e77374cc7c962b1b92f2

Only the greek letter sigma had two lower case values (σ = U+3C3, ς = U+3C2) for a single upper case value (Σ = U+3A3), but this is no more true in the Win8 variant.

To fix the upper case table, use chkdsk on Windows.

Regards

Jean-Pierre


Fri Jul 19, 2013 21:29
Profile

Joined: Mon Jun 11, 2012 22:44
Posts: 7
Post Re: Lowercasing problem on lowntfs filldir
You were spot on, the $UpCase table was corrupt. Thanks for the help and sorry for the false bug :mrgreen: .

Nick


Wed Jul 24, 2013 19:47
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.