We are using R16B03-1 and trying to upgrade to R17.

iolist_to_binary and list_to_binary breaks if there are Chinese characters inside.

I googled and found following links to explain the problem.

The default encoding of Erlang files has been changed from ISO-8859-1 to UTF-8. The encoding of XML files has also been changed to UTF-8

Only if a string contains code points < 256, can it be directly converted to a binary by using i.e. erlang:iolist_to_binary/1 or can be sent directly to a port. If the string contains Unicode characters > 255, an encoding has to be decided upon and the string should be converted to a binary in the preferred encoding using unicode:characters_to_binary/{1,2,3}. Strings are not generally lists of bytes, as they were before Erlang/OTP R13. They are lists of characters. Characters are not generally bytes, they are Unicode code points.

My question is must we modify all list_to_binary to unicode:characters_to_binary ?

Thanks