Util - encode function also replaces ' ' and ':' by '_'