fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Components Unicode character support - ü

Open Cecildt opened this issue 9 years ago • 5 comments

Bug Report

  • Package version(s): 4.31.0
  • Browser and OS versions: All

Describe the issue:

When trying to use Unicode character in the CommandBar like ü it does not display the character. It only shows a ? mark.

Actual behavior:

Display ? character.

Expected behavior:

Should display Unicode character.

Cecildt avatar Aug 11 '17 15:08 Cecildt

Hey @Cecildt, can you share more details of how and where you're using the CommandBar? Or what browser/device this is reproing in?

By default, Segoe UI West European should be rendered, which definitely supports ü. Even if for some reason you aren't loading Segoe (e.g. if its download is blocked or if you choose for it to not be provided), all text should fall back to locally-installed fonts, which should also include ü.

I tested this locally on v4.32.0 by nuking all classes that set Segoe, and ü is still rendering--in my case falling back on Arial. Here's my highly-technical diagram illustrating this: image

Jahnp avatar Aug 12 '17 06:08 Jahnp

Make sure you're not mixing up UTF-8 and Codepage 1252 encoding in text editor and charset (https://www.w3schools.com/html/html_charset.asp)

PFAR avatar Aug 13 '17 18:08 PFAR

Thanks for the replies. The font is loading correctly. Looking at the js file that gets produced from webpack to compile the typescript to js I see the content is also wrong. I will first try to fix the output. I think there is a problem related to the encoding of the final js output file.

{ key: "newButton", name: "� Button � abc", icon: "AddTo", items: [], onClick: function (e) { e.preventDefault(); return; } }

Cecildt avatar Aug 14 '17 03:08 Cecildt

Some additional information: The problem was related to Visual Studio IDE not saving the files (.ts, .tsx) as UTF-8. This caused webpack to output the final JS file as ANSI. Always ensure your source files (.ts, .tsx) are saved with the file encoding UTF-8.

In VS IDE select the menu File -> Advanced Save Options to change the file encoding to Unicode (UTF-8 without signature) - Codepage 65001

Cecildt avatar Aug 15 '17 07:08 Cecildt

@Cecildt I would recommend to save it with signature (BOM byte order marker) so it's always clear for editors and compilers what the encoding is

PFAR avatar Aug 15 '17 08:08 PFAR