first working version (I think).  Punts on UnicodeEncodeError.