Changed wstrip to support various encoding