Added attribute to store internal string encoding name instead of querying it over and over again below.