About Language Change in Java Console

Started by Billy, May 26, 2012, 06:35:24 PM

Previous topic - Next topic

Billy

Hi, Victor!

     There is a question need your help: after i modified the name of java console to Chinese(i.e. change "Network Maps" to 网络拓扑", i find the new Chinese name i input is not complete, for example, if i input "网络拓扑", only "网络" can be displayed, but if i input 4 blanks after "网络拓扑"("网络拓扑    "), then all words will be displayed. why?

     Thank you and wait online for your help...

Best Regards

Victor Kirhenshtein

What operating system your NetXMS server is running on? If not on Windows, what code page is set in netxmsd.conf?

Best regards,
Victor

Billy

#2
[root@NETMAN ~]# uname -a
Linux NETMAN 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux

and the following is the CENTOS's current charactor set(chinese):
[root@NETMAN ~]# locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=



# Example:
DBServer = localhost
CodePage = UTF-8

and i have tried to set CodePage to gb2312, it's also the same.

To locate the real problem, this morning, i have installed the 1.2.0 vesion Server Binaries in Windows and used the same java console client to connect,  and found the Chinese words displaying result is nomal. So, i can comfirm that the problem is in CentOS's  or Mysql's characters setting, following this clue, i tried changing Mysql's character set to UTF8 and gb2312 and restart Mysqld and netxmsd, but the problem was not solved yet.

Another thing:
when i compliled server code in CENTOS with variable "--enable-unicode", compile process will stop and tell me something is wrong.
Error info as follows:
Making all in libnetxms
make[3]: Entering directory `/home/nms/src/libnetxms'
  CXX    agent.lo
  CXX    array.lo
  CXX    base64.lo
  CXX    config.lo
config.cpp: In member function 'bool Config::loadConfigDirectory(const wchar_t*, const wchar_t*)':
config.cpp:1086: Error:'DIRW'在此作用域中尚未声明 (meaning: not declared in this domain)
config.cpp:1086: Error:'dir'在此作用域中尚未声明
config.cpp:1091: Error:'wopendir'在此作用域中尚未声明
config.cpp:1097: Error:'wreaddir'在此作用域中尚未声明
config.cpp:1101: Error:invalid use of incomplete type 'struct dirent_w'
config.cpp:1087: Error:forward declaration of 'struct dirent_w'
config.cpp:1101: Error:invalid use of incomplete type 'struct dirent_w'
config.cpp:1087: Error:forward declaration of 'struct dirent_w'
config.cpp:1104: Error:invalid use of incomplete type 'struct dirent_w'
config.cpp:1087: Error:forward declaration of 'struct dirent_w'
config.cpp:1110: Error:invalid use of incomplete type 'struct dirent_w'
config.cpp:1087: Error:forward declaration of 'struct dirent_w'
config.cpp:1114: Error:'wclosedir'在此作用域中尚未声明
make[3]: *** [config.lo] Error 1
make[3]: Leaving directory `/home/nms/src/libnetxms'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/nms/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nms'
make: *** [all] Error 2
[root@localhost nms]#

the following is about iconv compiling info:
checking for libiconv_open in -liconv... no
checking for iconv in -liconv... no
checking for iconv... yes
checking whether iconv supports UCS-2-INTERNAL... no
checking whether iconv supports UCS-2... yes
checking whether iconv supports UCS2... yes
checking whether iconv supports UCS-2BE... yes
checking whether iconv supports UCS-2LE... yes
checking whether iconv supports UTF-16... yes
checking whether iconv supports UCS-4-INTERNAL... no
checking whether iconv supports UCS-4... yes
checking whether iconv supports UCS4... yes
checking whether iconv supports UCS-4BE... yes
checking whether iconv supports UCS-4LE... yes
checking whether iconv supports UTF-32... yes
checking whether iconv supports ISO8859-1... yes
checking whether iconv supports ISO-8859-1... yes
checking whether iconv supports ASCII... yes
checking whether iconv supports //IGNORE... yes
checking for iconv declaration...


Maybe it is the real reason? i don't know......

Dear Victor & Alex,  hope you can give me some advice, thank you very much!


Victor Kirhenshtein

Hi!

I think the only correct solution will be to move server to unicode on Linux. Yesterday I take a look at unicode build - so far I have fixed all build errors in libnetxms, and got to mib compiler and libnxsrv. I'm not sure that I will be able to create working unicode build till 1.2.1 release, but I'll keep working in that direction.

Best regards,
Victor

Billy

#5
Thank you anyway! Victor, you are really a kind man!