please explain illegal char replacement
Posted: January 3rd, 2009, 10:03 am
Hi
I'm trying to get a script to play nicely with SAB, so I need to mimic the way characters are replaced. The thing is, my observed behaviour does not tally with the SAB code, so I'm confused -
the code
replaces the illegal chars with the corresponding legal chars, yet I'm seeing replacements (on win32) such as
: becomes ; - some other chars become .
how can that happen when the SAB code doesn't do it?!
ta
I'm trying to get a script to play nicely with SAB, so I need to mimic the way characters are replaced. The thing is, my observed behaviour does not tally with the SAB code, so I'm confused -
the code
Code: Select all
illegal = r'\/<>?*:;|"'
legal = r'++{}!@--#`'
: becomes ; - some other chars become .
how can that happen when the SAB code doesn't do it?!
ta