maps a stream iff it's of the specified channel
sanitize wide tilde chars, which are different between win and mac
rescues exception only in registration script