I noticed locations in source files, for error messages and JSON data,
assumes a 8 bits character set and so offsets are given in bytes rather
than in characters.
That’s not an issue, just that I would like to know if it’s a feature or if
it may be subject to change in the future.
Yes, offsets are given in bytes rather than in characters.
I do not plan to change it.
If one wants offsets in terms of characters, then one needs
to write a translation function. For instance, ats2-mode for emacs
can interpret offsets in bytes properly (try M-\backquote on your own).On Sunday, February 15, 2015 at 3:44:24 PM UTC-5, Yannick Duchêne wrote:
I noticed locations in source files, for error messages and JSON data,
assumes a 8 bits character set and so offsets are given in bytes rather
than in characters.
That’s not an issue, just that I would like to know if it’s a feature or
if it may be subject to change in the future.