[Box Backup] Re: bbackupquery.exe encoding
Chris Wilson
boxbackup@boxbackup.org
Wed, 4 Mar 2009 20:23:22 +0000 (GMT)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--8323328-1176548683-1236197904=:4723
Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8BIT
Content-ID: <alpine.LRH.2.00.0903042018591.4723@localhost>
Hi Christian and Ben,
(copying the Box Backup mailing list, as this may be of interest to other
users)
On 4 Mar 2009, at 12:08, Christian Blank wrote:
> The main problem is, that we in German use "umlaute" like öäü and ß. For
> example at the profile's folder is a folder called "startmenü" like
> startmenu at yours. The bbackupquery.exe is showing this correctly and
> doens't make some problems, if used directly. I'm redirecting the stdout
> of bbackupquery.exe to parse and show in the gui. Then the encoding is
> wrong and i get ? instead of ü. Now the question: Can you tell me wich
> encoding your stdout is?
Windows terminals don't display unicode properly by default, as the
default (fixed) font doesn't supply all Unicode characters. So by default
we leave the terminal in the system code page, which I believe is the one
returned by the Windows function GetConsoleCP(). This is probably one of
the values listed in the Registry under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage. On a
German machine, it's most likely CP_850.
You may be able to use CP_ACP instead of a specific code page in your
code, to determine this value automatically at run time.
If you call bbackupquery with the -u option, on Windows, it will attempt
to switch the console code page to UTF-8, and it will output all strings
untranslated. This doesn't work on the console unless you switch the font
to Lucida, but it may well be exactly what you need in this case.
Hope this helps, let me know if you still have problems.
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
--8323328-1176548683-1236197904=:4723--