Page 1 of 1

please explain illegal char replacement

Posted: January 3rd, 2009, 10:03 am
by doubledrat
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

Code: Select all

    illegal = r'\/<>?*:;|"'
    legal   = r'++{}!@--#`'
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

Re: please explain illegal char replacement

Posted: January 3rd, 2009, 10:49 am
by shypike
Release 0.4.6 doesn't replace ':' with ';' (release 0.4.5 did that).

What are you trying to accomplish?
What is the source of your NZB names?
Note that many sites already do substitutions themselves (like newzbin.com and tvnzb.com).

Re: please explain illegal char replacement

Posted: January 3rd, 2009, 10:56 am
by doubledrat
that explains it.  I'm using 0.4.5 but checked the code of 0.4.6

dohw!

thanks.

ps: have you ever considered replacing

& with + 

too? - an & can bugger up windows post-processing something rotten!

Re: please explain illegal char replacement

Posted: January 10th, 2009, 4:05 pm
by redvers
shypike wrote: Release 0.4.6 doesn't replace ':' with ';' (release 0.4.5 did that).
Why was this changed? All my series I set up and downloaded under 0.4.5 now all go to a different folder! Is ';' an unsupported character somewhere?

Re: please explain illegal char replacement

Posted: January 11th, 2009, 6:34 am
by shypike
Yes, Linux and OSX don't really like it.
And many people just dislike it.

BTW, there's also an option to remove illegal characters altogether.