-
Notifications
You must be signed in to change notification settings - Fork 90
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
file in GBK encoded line jump to wrong place #27
Comments
Note: This happens with all variable byte length encoding types (e.g. utf8). The issue is that VSChromium treats byte offsets the same as character offsets for all encoding types except UTF-16. |
rpaquay
added a commit
that referenced
this issue
Nov 17, 2016
VsChromium incorrectly treats byte offsets as character offsets. This works for simple ascii encoding, but creates issues with variable length encoding, such as UTF8 and GBK. To mitigate this problem, VsChromium now uses the (line, column) information when navigating to a code search result. The (line, column) pair is translated by the VS Editor into a character offset. This is not a 100% correct solution, as other part of VsChromium also rely on the byte offset == character offset assumption, but this CL fixes the most obvious user-facing issue (e.g. navigation). Note that this issue does not apply to UTF16 files, as VsChromium correctly translates character offset = byte offset / 2.
I understand the reason... will you fix this? |
Yes. I made a (partial) fix in c713abf |
thank you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if GBK encoded,
find then click position in codes
it jump wrong position
The text was updated successfully, but these errors were encountered: