Post Reply 
50g: copy all stored objects to SD card individually
10-16-2016, 04:57 PM (This post was last modified: 10-19-2016 07:11 PM by matthiaspaul.)
Post: #15
RE: 50g: copy all stored objects to SD card individually
(10-16-2016 10:37 AM)Claudio L. Wrote:  I can't recall if it was fixed in latest ROMs, but I remember the worst offending case of illegal characters was lowercase letters.

:3:"lcase" STO

used to produce a SFN only (because the name fits in 8.3) but without changing the name to uppercase. Lowercase letters are illegal characters in SFN, those files couldn't be touched with a PC but could be deleted normally with the calc.
That's correct. The underlying technical reason why most operating systems won't be able to access FAT files stored with lowercase SFNs is because they will upcase the filename provided by the user and compare it with the filename stored on disk while assuming that it is stored in upper case already - consequently, SFNs stored in lower case will never match and thus the files are never found.

In many systems the upcase vector for codepoints 00h..7Fh is hardwired assuming an ASCII character set, so characters 61h..7Ah are just translated into 41h..5Ah. However, for codepoints 80h..FFh the upcase translation can differ significantly depending on the active codepage, country settings, and operating system. For example, depending on context codepoint 8Dh ("ì" in codepage 437 and 850) would be translated to either "Ì" or "I" or not be translated at all.

This is also the reason why properly upcasing the on-disk filename later on would require knowledge about the active codepage and country setting at the time the file was originally stored. Only codepoints 61h..7Ah could be reliably upcased later on.

Knowing that the 49g+/50g firmware can or could create such invalid SFNs, perhaps newRPL should be enhanced by adding a little special case which would upcase 61h..7Ah in on-disk SFNs before filename comparisons in order to improve compatibility at least for direct file exchange. This would consume only a couple of bytes and not be conflictive with normal file access as these characters cannot normally occur in SFNs.

I don't have a free SD card handy right now to perform some tests myself, but wouldn't storing

:3:"lcase;;;;;;;" STO

on a 49g+/50g with HP firmware also work around the problem in a way compatible with newRPL and operating systems supporting LFNs?



EDIT: See also:

"Programs are poems for computers."
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: 50g: copy all stored objects to SD card individually - matthiaspaul - 10-16-2016 04:57 PM

User(s) browsing this thread: 1 Guest(s)