Fix write return value for UTF8