[Boxbackup-dev] [common/Windows] logging to console

Chris Wilson chris at qwirx.com
Wed Nov 21 21:36:03 GMT 2012


Hi Arnaud,

On Mon, 19 Nov 2012, bb at grandville.net wrote:

> Let me clarify some things:
> 1. it's a very bad idea to put accents in the path !

I'm not sure if you're joking :) I'm sure several of our users have 
accents in their paths, and we ought to support it.

> 2. with all my windows editor (notepad, Notepad++, Write, ...), whatever the
> format is (ascii, utf8, utf16), the file is correct on screen, but the data
> stored on disk is different:
> - with ascii encoding, contents looks like unix file, but if it contains
> localized char, the 'value' must be converted from local code page to utf8
> to remain usable.
> - with utf8 encoding, 'value' could remain as is, but file starts with tree
> bytes 'EF BB BF'
> - with utf16 (Unicode), the configuration parser must be rewrite and
> libiconv must be add to the project.

On second thoughts, I'm pretty sure that Windows includes UTF-16 
conversion somewhere in the standard library, so we might not need to link 
with libiconv.

My guess is that Windows' users expectations are that they can save files 
using Notepad without choosing UTF-8 encoding and things will "kind of" 
work (i.e. they'd better not change the system code page).

So I propose as a first step to convert each value in the config file from 
the current system encoding to UTF-8. If that proves not to be enough, 
then I'll add support for detecting UTF-8 and UTF-16 files and converting 
them automatically.

Any objections?

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <chris+sig at qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |



More information about the Boxbackup-dev mailing list