-
Notifications
You must be signed in to change notification settings - Fork 505
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
Adding UTF-8 support for WideCharToMultiByte method - Windows Platform #91
base: master
Are you sure you want to change the base?
Conversation
If process environment variable value has non-english language characters (e.g. chinese ) then SIGAR_W2A(lpw, lpa, chars) is not able to make the conversion into multi byte properly. Fixing this by specifying code page as UTF-8. SIGAR_A2W(lpa, lpw, bytes) will also use UTF-8 now for consistency.
Hi,Xeronix |
Adding sigar build instructions.
Hi,
Which sigar API are you calling where this chinese character issue is
occurring ? Have you checked in debugger if characters are showing
correctly or not ?
…On Thu, Feb 22, 2018 at 10:02 AM, zw3413 ***@***.***> wrote:
Hi,Xeronix
I was facing the problem of Chinese characters showing, I modified the
code you mentioned here, and complied the sigar source by myself, with
win7, vs2015 and java1.8. After all compiled ok though encountered some
reference problem in the compiling. But unfortunatly, after the
modification you suggested, I didn't see the chinese characters showing
correctly still.
I have read a lot of suggestions about fixing the chinese showing problem.
The main point is to convert the string to utf-8 at c/c++ side (as asc and
gb2312 were used for encoding at c/c++ or win side mixly), I also readed
the c source of sigar, but didn't find where I can add this conversion, can
you kindly give some tips?
In the ant buidling, looks like the jni was built by the perl script, I
don't know about perl , so it is hard to read all the structure. It would
be very grateful if you can provide some direction, or suggestions on
looking into the sigar source and the way to resolve the chinese showing
problem.
Thanks,
zhangw
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#91 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHJn6CzRA0s29M8_CQiPvocXPNgXWc8rks5tXO32gaJpZM4KPpYW>
.
--
Regards,
Vipul
|
Hi, |
Hi Vipul,
cfg.getName() Loopback Pseudo-Interface 1
cfg.getName() eth0 the code is as below: It is obsvious that the getName() and get Description() function didn't work properly, I didn't check any other similar problem functions. Could you help? Below is the step I did the compiling:
and
|
If process environment variable value has non-english language characters (e.g. chinese ) then SIGAR_W2A(lpw, lpa, chars) is not able to make the conversion into multi byte properly. Fixing this by specifying code page as UTF-8.
SIGAR_A2W(lpa, lpw, bytes) will also use UTF-8 now for consistency.