Coding for Nonstandard Channels: A Capacity-Oriented Approach