I agree wholeheartedly with those who endorse EAC (Exact Audio Copy); I haven't found anything which comes close to it for accuracy.
But encoding is another matter; it surprises me that I see no mention of dbPowerAmp in this thread. It's free, it offers encoding into any of the media currently in use, and it has a really good support forum, moderated by, among others, the designer himself.
The homepage is a good read, and a few minutes spent here will enable you to download and select whichever programs seem most appropriate to your needs.
www.dbpoweramp.com is the url for those interested.