Changed string strip to support various encoding