Skip to content

SW31007: Invalid UTF-16 position

A requested line and column do not exist in the source.

This error occurs when an integration or a tool asks for a line and column that do not exist in the source. Lines count from zero, and columns count UTF-16 code units from zero.

How to fix

  • With an official integration, report the error with the file and the action that caused it.
  • In your own integration, convert positions from one-based editor numbers, and compute them again after each edit. Do not use positions in the converted script as positions in the original component.