First of all I wonder what we want to achieve with this functions. I
understand that we want to avoid characters that can give us problems
with filenames on different systems.

On linux/unix I know of only one char: '/'

Of course there are others that is not usually used in filenames, like
'\n' and ';', but they are not really a problem.

On Win we probably have a problem with '\\' as well.

What about OS/2?

Anyway. If you could tell be which of the chars that this outputs
should not be used in filenames:

// begin test file
#include <cctype>
#include <iostream>
int main()
{
        for (int i = 0; i < 256; ++i) {
                int k = i & 0x7f; // strip 8th bit
                if (!isgraph(k))
                        k = '_';
                cout << "(" << i
                     << ") Modified: `" << char(k) << "'" << endl;
        }
}
// end test file


        Lgb

Reply via email to