Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that our character offsets are in utf-16 code units #241522

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Feb 21, 2025

After testing I think that our API use utf-16 code units just like normal JS strings. I think we should make sure this is stated explicitly. Otherwise the offset could potentially be understand as:

  • Bytes
  • Code units
  • Displayed characters
  • Code units including surrogate pairs

@mjbvz mjbvz added this to the February 2025 milestone Feb 21, 2025
@mjbvz mjbvz requested a review from alexdima February 21, 2025 20:40
@mjbvz mjbvz self-assigned this Feb 21, 2025
@mjbvz mjbvz requested a review from jrieken as a code owner February 21, 2025 20:40
Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically. Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting /AzurePipelines run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant