def fileName2FSEnc(fn):
        if isUnicode(fn):
            return  fn
        else:
            for enc in fsEncodings:
                try:
                    return fn.decode(enc)
                except:
                    pass
        raise ValueError('cannot convert %r to filesystem encoding' % fn)