Re: Fw: Re: filename error

"Roger Binns" <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <00c301c5545a$496fca20$3501a8c0@rogersqyvr14d3>
> Any suggestion on a logic to fix this?

The easiest way is to encode "bad" characters.  For example we 
could use the standard web scheme and use % followed by two
hex digits.

Since filenames are bytes on the phone, we'll need to preserve
bytes on the filesystem, especially those filesystems that support
unicode and various other encodings.

So % encoding the following should do the trick:

 - % itself
 - all bytes less than 32 or more than 127
 - /    (Unix)
 - / :  (Mac)
 - / \ [ ] ? * : " < > | = ;  (Windows)

This will screw up anyone who already has % in a filename after
the version that introduces the fix, but there isn't really any
other way.

Another alternative is to go the whole hog and base64 encode the
entire filename.  That then means we have to supply an intermediate
temporary file for things like dragging out.

Roger


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.