docs icon indicating copy to clipboard operation
docs copied to clipboard

`Rune` is available from .NET Core 3.0 and not on .NET Framework

Open deep-outcome opened this issue 1 year ago • 0 comments

Type of issue

Typo

Description

From https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-encoding-introduction#the-rune-type-as-a-scalar-value

Beginning with .NET Core 3.0, the System.Text.Rune type represents a Unicode scalar value. Rune is not available in .NET Core 2.x or .NET Framework 4.x.

From https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-encoding-introduction#example-count-char-rune-and-text-element-instances

If you run this code in .NET Framework or .NET Core 3.1 or earlier, the text element count for the emoji shows 4. That is due to a bug in the StringInfo class that was fixed in .NET 5.

  • Second quotation is flawed by fact that, AFAIK, Rune is available only to .NET from version Core 3.0.
  • First quotation suggest that earlier versions of Framework have Rune while only 4.x versions does not. Similar applies to ..NET Core prior 2.x.

Page URL

https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-encoding-introduction

Content source URL

https://github.com/dotnet/docs/blob/main/docs/standard/base-types/character-encoding-introduction.md

Document Version Independent Id

d53a0764-9f27-16b3-c40a-9627dd1bcc0d

Article author

@adegeo

Metadata

  • ID: a6cf7421-fbd2-0ca0-7385-4df65531fd66
  • Service: dotnet-fundamentals

Related Issues


Associated WorkItem - 323541

deep-outcome avatar Sep 30 '24 19:09 deep-outcome