:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
Now that #4706 is merged, the debugger will no longer count an astral-plane character as two characters instead of one for the purpose of line/column numbering. However, this still leaves potential problems when comining characters are used, since the debugger only knows about code points, not grapheme clusters. So, we might want to have a way to get the column numberings in terms of grapheme clusters, instead of just in terms of code points.
That said, Solidity probably does things in terms of code points, not grapheme clusters, so it's possible this would have to be in addition to how we do things currently. Like, we might want to report column numbers in terms of code points for most purposes, but use the grapheme-cluster numbers for the purpose of displaying the carets in the debugger? It's the carets I was thinking of when writing this issue. Fullwidth characters might also pose a problem here.
Issue
Now that #4706 is merged, the debugger will no longer count an astral-plane character as two characters instead of one for the purpose of line/column numbering. However, this still leaves potential problems when comining characters are used, since the debugger only knows about code points, not grapheme clusters. So, we might want to have a way to get the column numberings in terms of grapheme clusters, instead of just in terms of code points.
That said, Solidity probably does things in terms of code points, not grapheme clusters, so it's possible this would have to be in addition to how we do things currently. Like, we might want to report column numbers in terms of code points for most purposes, but use the grapheme-cluster numbers for the purpose of displaying the carets in the debugger? It's the carets I was thinking of when writing this issue. Fullwidth characters might also pose a problem here.
Environment
truffle version
): 5.4.32