Added encoding to utilities.