WPF SyntaxEditor doesn't handle selection of UTF-8 chars in strings in some cases

SyntaxEditor for WPF Forum

Posted 4 months ago by Johannes Turner - National Instruments Corporation
Version: 19.1.0681
Platform: .NET Core 3.0
Environment: Windows 10 (64-bit)
Avatar

The WPF SyntaxEditor control doesn't handle selecting certain UTF-8 chars in C-style strings.

Here are the steps to reproduce:

  1. Type one of the following strings in the SyntaxEditor component:
    • "𝕌𝕟𝕚𝕔𝕠𝕕𝕖"
    • "♥"
  2. Double-click the string literal inside the quotes ("") to create a selection.
  3. Notice that the editor selects the ending quote (") instead of the string literal itself.

The workaround is to create the selection manually, using the cursor caret.

PS: This is my first bug report, is there a way to subscribe to this bug report, so that I can get notified when or whether this bug will get fixed? Thanks!

[Modified 4 months ago]

Comments (1)

Answer - Posted 4 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Johannes,

Thank you for reporting this.  The word break finder (IWordBreakFinder) service is what determines how to locate words for a language.  If no custom IWordBreakFinder service is specified for the language, then an instance of DefaultWordBreakFinder is used by default.

The logic in DefaultWordBreakFinder will scan for a sequential range of letter or digit characters but it appears it wasn't handling surrogate pairs or some symbols properly.  We will improve this for the next maintenance release.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.