please explain illegal char replacement

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

please explain illegal char replacement

Post 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
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: please explain illegal char replacement

Post 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).
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: please explain illegal char replacement

Post 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!
redvers
Newbie
Newbie
Posts: 1
Joined: November 1st, 2008, 8:34 am

Re: please explain illegal char replacement

Post 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?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: please explain illegal char replacement

Post 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.
Post Reply