ctags
ctags copied to clipboard
Strange character as tag in Units/bug1777340.java.t
I accidentally noticed that when you look at expected.tags
in bug1777340.java.t
there is a strange result at line 3. The tag is Ó
but this should be an n
.
https://github.com/fishman/ctags/blob/master/Units/bug1777340.java.t/expected.tags#L3
Indeed. After some extensive digging I found out where this 0xd3
character comes from: it's STRING_SYMBOL
from read.h.
The actual bug is a combination of 2 things:
- there is a special case for Java allowing characters out of ASCII in some identifiers (through
isHighChar()
). AsSTRING_SYMBOL
returned bycppGetc()
is considered a "high character" the string gets recognized as a name and it's character representation is used,"\x3d"
, which happens to beÓ
in ISO-8859 character sets. This part IMO should be fixed by changing the value ofSTRING_SYMBOL
to be above0xff
so it's not a valid character, and makeisHighChar()
only recognize possible high-end characters (<= 0xff
). I'll prepare a PR for this. - the code actually handling the construct doesn't seem to recognize the
default "..."
construct and thus uses an inappropriate token for creating the tag.
Sorry for the noise. Just switching the "Release blocker" tag for the "Initial release" milestone so that everything is tracked in one place.