"Neil Hodgson" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Michael:
> 
> > Like I said, it's only supposed to run on linux; anyway, is it likely
> > that problems will arise when filenames I have to handle have
> > basically three sources:
> > ...
> > 3. filenames created by user input
> 
>    Have you worked out how you want to handle user input that is not
> representable in the encoding? It is easy for users to input any characters
> into a Unicode enabled UI either through invoking an input method or by
> copying and pasting from another application or character chooser applet.
> 
>    Neil

As I must admit, no. I just couldn't figure out that someone will really do 
this.

I guess I could add a test like (pseudo code):

try:
    test = fsdecode(input)# convert to unicode
    test.encode(sysencoding)
except:
    # show a message box with something like "Invalid file name"

Please tell me if you find any other possible gotchas.

Thanks so far

Michael
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to