Skip to content

UTF-8 characters like EN DASH (–) and EM DASH (—) are displayed as squares in Preview Pane #18

@DKWien

Description

@DKWien

When using MarkdownShellExtensions on Windows Explorer, certain UTF-8 characters such as EN DASH (–, U+2013) and EM DASH (—, U+2014) are not rendered correctly in the preview pane. Instead, they appear as small squares ▢.

Details:

  • The .md file is saved as UTF-8 without BOM (verified in Notepad++)
  • Fonts tested: Segoe UI, JetBrains Mono, Consolas → same problem
  • Normal hyphen-minus - displays fine, but and are not recognized
  • The issue seems related to UTF-8 parsing or codepage fallback in the rendering component

Steps to Reproduce:

  1. Create a test.md file with the following content:

    - normal hyphen
    – en dash
    — em dash
    
  2. Open the file in Windows Explorer with MarkdownShellExtensions preview enabled

  3. Observe: only the first line renders correctly, others show ▢

Expected Behavior:
All characters should render properly as long as the selected font supports them (e.g. JetBrains Mono does).

Environment:

  • Windows 11 x64
  • MarkdownShellExtensions (latest release, [insert version])
  • Preview Pane enabled in Explorer

Possible Cause:

  • Text not being parsed as UTF-8, fallback to Windows-1252
  • Missing explicit UTF-8 decoding in the Delphi rendering code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions