fix #23

format string to set encoding was resulting in a unicode string, illegal type for windows environment
removed code that was setting the encoding twice on windows