Closed dingmingxin closed 9 years ago
Can you see multibyte symbols/functions in terminal ? I suppose GNU global does not support multiple bytes characters.
I tested with following code.
public class Test {
public static int func() {
return 10;
}
public static int 関数() {
return 20;
}
public static void main(String[] args) {
System.out.print("10 + 20 = ");
System.out.println(func() + 関数());
}
}
# Create tag files
% gtags
# Show all symbols
% global -c
Test
func
main
I expect that global -c
outputs Test
, func
, 関数
, and main
. But it does not output 関数
which contains multiple byte characters. I used latest GNU global.
% global --version
global (GNU GLOBAL) 6.5
Copyright (c) 2015 Tama Communications Corporation
License GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
I tested the code you provided, It seems that global -c
does not show tags which started with multiple characters.
Test using code blow:
public class Test {
public static int func() {
return 10;
}
public static int 関数() {
return 20;
}
public static int a関数() {
return 20;
}
public static void main(String[] args) {
System.out.print("10 + 20 = ");
System.out.println(func() + 関数());
}
}
======= result ========
# Create tag files
% gtags
# Show all symbols
% global -c
Test
a関数
func
main
======== gtags -d ========
gtags -d GTAGS
#Result:
__.COMPNAME __.COMPNAME
__.COMPRESS __.COMPRESS ddefine ttypedef
__.VERSION __.VERSION 6
Test 1 @n 1 public class @n {
a関数 1 @n 10 @4public static int @n() {
func 1 @n 2 @4public static int @n() {
main 1 @n 13 @4public static void @n(String[] args) {
関数 1 @n 6 @4public static int @n() {
Further more , I used global -c prefix
global -c 関
#Show all symbols started with "関"
関数
I suppose GNU global support multiple byte characters, but the command global -c
not show all.
I am looking for the perfect way to show all the symbols and I am starting to wonder if this is a small bug of GNU global.
http://cvs.savannah.gnu.org/viewvc/*checkout*/global/global/FAQ?revision=1.52
Q10. Does GLOBAL support multi-byte code set? Which character code set is supported?
A10. GLOBAL doesn't support multi-byte character code set yet. GLOBAL supports only ASCII and ASCII supersets.
There is GTAGS GPATH GRTAGS in my project root. I had generated tags using gtags command. When using
gtags -d GTAGS
I can see some of the tags are started with Chinese which can not show in emacsM-x: helm-gtags-select
. It only shows tags started with English.