in reply to Re^2: Unicode surrogate is illegal in UTF-8
in thread Unicode surrogate is illegal in UTF-8

Could I generate/detect this warning without using "print" (i.e. so I could fix/replace silently)?

Have a look at Handling Malformed Data.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^3: Unicode surrogate is illegal in UTF-8