wire-webapp icon indicating copy to clipboard operation
wire-webapp copied to clipboard

Unicode support missing for group titles

Open Wurzelkoch opened this issue 3 years ago • 2 comments

Version 3.21.2936 Wire for Web Version 2021.04.01.08.46 Operating system: Linux 4.19.0-14-amd64 wireapp/wire-desktop#1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux What steps will reproduce the problem?

  1. Create a new group with german Umlauts (eg ü) in the title

What is the expected result?

Title is shown as was the input.

What is the actual result?

Umlaut is shown only on android, while on desktop instead of an "ü" I see "ü".

Usernames containing Umlauts are shown as expected.

Wurzelkoch avatar Apr 06 '21 14:04 Wurzelkoch

Chinese is also like this And the search function is not working

summic avatar Apr 26 '21 04:04 summic

The issuse was caused by the BufferToString function in api-client/src/shims/browser/buffer.ts

export const bufferToString = (buffer: ArrayBuffer): string => {
  let binaryString = '';
  const bytes = new Uint8Array(buffer);

  for (let index = 0; index < bytes.length; index++) {
    binaryString += String.fromCharCode(bytes[index]);
  }

  return binaryString;
};

String.fromCharCode(bytes[index]) Converts one byte directly to ASCII Char,not support UTF-8

oomhj avatar May 27 '21 03:05 oomhj