Skip to content

Fix an issue where strings with multibyte chars cause truncation issues #2296

Ben requested to merge fix/multibyte-str-valid-2296 into master

Ticket(s) / Related Merge Requests

#2296 (closed)

Summary of Changes

Fixes an issue where Emojis are truncated mid-character, causing malformed UTF-8 encoding errors in various places.

Testing Considerations

This test plan will only work for a short while, as it relies on using an old sandbox to bypass the character limit

  1. Go to this post on a sandbox WITHOUT the string validation changes https://fix-wire-notifs-2294.minds.io/newsfeed/1361276151707734035
  2. Copy the FULL content of the post, and post it yourself from account A
  3. Upvote the post with account B
  4. Check the notifications of account A and notice they don't load.
  5. Check the notifications of account A on THIS SANDBOX instead, and it should work
  • Sidenote: For bonus points look in the logs.

Regression Scope

Effects string length validation - shouldn't really change much other than for multi-byte characters.

Platform Affected (web, mobile, etc)

Web

Developer Testing Completed

Manual and unit tests.

Screenshots

Video: https://streamable.com/ex5eyl

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode
Edited by Ben

Merge request reports