CW-506 Incorrect count of UTF-8 characters