SSMS and Visual Studio Issue Displaying EUDC (End-User-Defined Characters)
Published Nov 20 2023 09:45 AM 2,088 Views
Microsoft

Issue:

---------------------------------------- 

A customer opened an interesting case stating SQL Server Management Studio (SSMS) would not display EUDC (End-User-Defined Characters) properly. More information on EUDC can be found here: End-User-Defined and Private Use Area Characters. 

 

After testing, it was identified by default, both SQL Server Management Studio and Visual Studio encountered this problem. In contrast, Notepad.exe displayed the desired character as intended. A shared aspect of SSMS and VS is the use of Windows Presentation Foundation (WPF).

 

 

 

Steps to Reproduce the Issue:

---------------------------------------- 

If you wish to reproduce the problem to see it for yourself:

  1.  Run "eudcedit"
  2. In "Select Code" window, select E000 in unicode(Private Use Area, EUDC)
  3. Create a random character, and Edit > Save Character
    • Ex) JamesFerebee_4-1699558957739.png
  4. Paste to notepad, where it should show the character you just created
    • JamesFerebee_5-1699558993565.png
  5. Paste to SSMS, it does not show the character
    • JamesFerebee_6-1699559037188.png

 

 

 

Workaround

---------------------------------------- 

To workaround this issue for any WPF application, if you pass the FontFamily Class and map it properly, then the character will be displayed. To achieve this is SSMS 19.0, do the following steps. Update the bolded values as needed.

  1. Launch SMSS and go to 'Tools' --> 'Options' --> 'Environment' --> 'Fonts and Colors' and change the font name for 'Text Editor'. Choose a more unique font for ease of finding, such as Lucida Console and press OK.
    1. JamesFerebee_0-1699563144644.png
  2. Exit SSMS
  3. Open file "%userprofile%\AppData\Local\Microsoft\SQL Server Management Studio\19.0_IsoShell\Settings\SQL Server Management Studio\NewSettings.vssettings" in your preferred text editor.
  4.  Change the corresponding font entry passing the path to the appropriate file. In my testing, there were 9 entries needing updating. The default TTE directory location is C:\Windows\Fonts\EUDC.TTE
    1. Example:
      1.  'FontName="Lucida Console"'
        1. to
      2. 'FontName="Lucida Console,file:///C:\<pathtofile>.TTE#EUDC"'
  5. Relaunch SSMS and test.
  6. Example:
    1. Character: 
      1. JamesFerebee_0-1699930295267.png

         

    2. SSMS text editor:
      1. JamesFerebee_1-1699930331386.png

         

    3. Results to text:
      1. JamesFerebee_1-1700500601357.png

         

    4. Results to grid:
      1. JamesFerebee_0-1700500581670.png

         

 

 

If you implement this workaround, then make sure to not change the settings in the SSMS User Interface as it'll reset the updated fonts.

The behavior is driven by the Visual Studio Shell, so fixing this term long-term is outside the scope of the SSMS product.

 

 

 

 

 

Co-Authors
Version history
Last update:
‎Nov 20 2023 09:28 AM
Updated by: