Discussion:
[drbd-mc] Japanese messages are garbled in a terminal panel
Takashi Takizawa
2011-02-08 03:56:50 UTC
Permalink
Hi,

I created the patch related to i18n. Please evaluate it.


When I add the Japanese message resource,
the Japanese messages are garbled in the terminal panel as follows:
Loading Image...

I created the following patch to resolve this issue.
http://ftp.3ware.co.jp/pub/drbd-mc/drbd-mc-0.8.12-terminalpanel.patch

Whene I applied this patch, the Japanese messages were not garbled as follows:
Loading Image...


I think that this patch does not affect messages from a remote host
because the drbd-gui-helper script sets the locale on a remote host to C.
Is it right?
--
Takashi Takizawa
ThirdWare Co., Ltd.
http://www.3ware.co.jp/
Rasto Levrinc
2011-02-08 10:19:12 UTC
Permalink
Post by Takashi Takizawa
Hi,
I created the patch related to i18n. Please evaluate it.
When I add the Japanese message resource,
http://ftp.3ware.co.jp/pub/drbd-mc/terminalpanel-garbled.png
I created the following patch to resolve this issue.
http://ftp.3ware.co.jp/pub/drbd-mc/drbd-mc-0.8.12-terminalpanel.patch
Thanks, applied. I think this concerns only the replies from the ssh
server...
Post by Takashi Takizawa
I think that this patch does not affect messages from a remote host
because the drbd-gui-helper script sets the locale on a remote host to C.
Is it right?
Well, drbd-gui-helper set locale to C for whatever happens in this script.
Other commands defined in configs/DistResource... files use whatever is
set on the servers. That can cause problems sometimes, if there is some
parsing involved, although till now nobody reported something like that. I
think I set it for every such command to never run into a problem.

Rasto
--
: Dipl-Ing Rastislav Levrinc
: DRBD MC http://oss.linbit.com/drbd-mc/
: DRBD MC http://www.drbd.org/mc/management-console/
: DRBD/HA support and consulting http://www.linbit.com/
DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.
Takashi Takizawa
2011-02-10 12:16:37 UTC
Permalink
Hi,

On Tue, Feb 08, 2011 at 11:19:12AM +0100,
Post by Rasto Levrinc
Well, drbd-gui-helper set locale to C for whatever happens in this script.
Other commands defined in configs/DistResource... files use whatever is
set on the servers. That can cause problems sometimes, if there is some
parsing involved, although till now nobody reported something like that. I
think I set it for every such command to never run into a problem.
An error sometimes occurs in the latest source code.
The following command causes an error.
LC_ALL=C if ! /etc/init.d/heartbeat status >/dev/null 2>&1; then /etc/init.d/heartbeat start; fi

I think that I had better transfer 'LC_ALL=C' to 'export LC_ALL=C;'.
However, I cannot try the case that ssh is hopped.

diff --git a/src/drbd/data/Host.java b/src/drbd/data/Host.java
index 0fb0fdb..1108f18 100644
--- a/src/drbd/data/Host.java
+++ b/src/drbd/data/Host.java
@@ -1483,7 +1483,7 @@ public class Host implements Serializable {
final String[] usernames = username.split(",");
final String[] ips = ip.split(",");
final StringBuffer s = new StringBuffer(200);
- s.append("LC_ALL=C ");
+ s.append("export LC_ALL=C;");
if (hops > 1) {
String sshAgentPid = "";
String sshAgentSock = "";
--
Takashi Takizawa
ThirdWare Co., Ltd.
http://www.3ware.co.jp/
Rasto Levrinc
2011-02-10 12:28:10 UTC
Permalink
Post by Takashi Takizawa
Hi,
On Tue, Feb 08, 2011 at 11:19:12AM +0100,
Post by Rasto Levrinc
Well, drbd-gui-helper set locale to C for whatever happens in this
script. Other commands defined in configs/DistResource... files use
whatever is set on the servers. That can cause problems sometimes, if
there is some parsing involved, although till now nobody reported
something like that. I think I set it for every such command to never
run into a problem.
An error sometimes occurs in the latest source code.
The following command causes an error.
LC_ALL=C if ! /etc/init.d/heartbeat status >/dev/null 2>&1; then
/etc/init.d/heartbeat start; fi
I think that I had better transfer 'LC_ALL=C' to 'export LC_ALL=C;'.
However, I cannot try the case that ssh is hopped.
Yes, you are right, I've already fixed that couple of days ago exactly the
same way, but didn't push it yet. Now I did.

Rasto
--
: Dipl-Ing Rastislav Levrinc
: DRBD MC http://oss.linbit.com/drbd-mc/
: DRBD MC http://www.drbd.org/mc/management-console/
: DRBD/HA support and consulting http://www.linbit.com/
DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.
Loading...