Bacula-users

[Bacula-users] Problem restoring files with non-english characters (webmin)

2009-10-29 10:39:12
Subject: [Bacula-users] Problem restoring files with non-english characters (webmin)
From: ladolf <bacula-forum AT backupcentral DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 29 Oct 2009 08:24:59 -0400
I have a question about the »Bacula Backup System« module for Webmin. I use 
bacula 3.0.2 and Webmin 1.490. I have problem restoring files using this module 
(restoring files using bconsole works great). The problem is that java applet 
(»threechooser.class«) doesn't correctly display slovenian characters 
(&#269;??&#268;??). If I use any browser on linux (all environments are set to 
UTF-8), I can normally see slovenian characters and do a restore. But, if I use 
any browser on windows XP system (UFT-16, I think), the java applet shows 
slovenian characters incorrectly (wrong character encoding). I am really 
surpised that this applet is not displaying UTF-8 characters correctly, since 
bacula is saving all filenames in UTF-8.

In effort to find a solution to this problem ? after unsuccessful googling ? I 
first changed »Character set for HTML pages« in language options of Webmin to 
UTF-8. Then I have added »-Dfile.encoding=UTF-8« to »Java Runtime Parameters«. 
Nothing helped. Then I made a correction to "treechooser.cgi" and added:

&nbsp; &nbsp; <meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8" />
</head>
<body>

because they were obviously missing. That didn't help either. I thoght it would 
because this code in threechooser.java made me think it would:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; URL u = new 
URL&#40;getDocumentBase&#40;&#41;, url&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; URLConnection uc = 
u.openConnection&#40;&#41;;
&nbsp; &nbsp;&nbsp; &nbsp;set_cookie&#40;uc&#41;;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String charset = 
get_charset&#40;uc.getContentType&#40;&#41;&#41;;

Then I tried to change 
String charset = get_charset&#40;uc.getContentType&#40;&#41;&#41;;
to
String charset = get_charset&#40;'UTF-8'&#41;;
but I didn't have enough knowledge to compile it (required java classes).

I really do not understand why this characters are correctly displayed under 
linux and incorrectly under windows. As it would  use OS environment variables. 
Maybe there is some other java parameter to set? Maybe some perl CGI uses wrong 
character set? Or maybe there is some javascript (Ajax?) posting filenames tho 
this applet?


Does anyone have the same problem? Does anyone have a solution for this? Can 
anyone at least explain how java applet »threechooser.class« is obtaining 
filenames?

Thanks in advance.

Lado

+----------------------------------------------------------------------
|This was sent by lado.langof AT gmail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>