in reply to convert a string(which contains the contents of a file) into UTF-8 encoding

Why are you using Unicode::String?
  • Comment on Re: convert a string(which contains the contents of a file) into UTF-8 encoding