Fixes writing of string with multibyte UTF8 characters. The position was calculated based on string size, which was incorrect since position should be in bytes.
The result was that when using file.puts for streaming, data would get overwritten (since the calculated position was too small).
Fixes writing of string with multibyte UTF8 characters. The position was calculated based on string size, which was incorrect since position should be in bytes.
The result was that when using file.puts for streaming, data would get overwritten (since the calculated position was too small).
Added test with 3 byte chinese characters.