The code does check for having SQL_ASCII encoding explicitly, and the
reasoning I can find for this is:

The docs say at https://www.bacula.org/de/dev-
manual/Installi_Configur_PostgreS.html#SECTION002820000000000000000 :

This script creates the PostgreSQL bacula database. Before running this
command, you should carefully think about what encoding sequence you
want for the text fields (paths, files, ...). Ideally, the encoding
should be set to UTF8. However, many Unix systems have filenames that
are not encoded in UTF8, either because you have not set UTF8 as your
default character set or because you have imported files from elsewhere
(e.g. MacOS X). For this reason, Bacula uses SQL_ASCII as the default
encoding. If you want to change this, please modify the script before
running it.

The code says:

src/win32/cats/create_postgresql_database.cmd says:

REM use SQL_ASCII to be able to put any filename into
REM  the database even those created with unusual character sets
SET ENCODING=ENCODING 'SQL_ASCII'

REM use UTF8 if you are using standard Unix/Linux LANG specifications
REM  that use UTF8 -- this is normally the default and *should* be
REM  your standard.  Bacula consoles work correctly *only* with UTF8.
REM SET ENCODING=ENCODING 'UTF8'


src/cats/create_postgresql_database.in says:

# use SQL_ASCII to be able to put any filename into
#  the database even those created with unusual character sets
[...]
#  We do not recommend that you use ENCODING 'SQL_UTF8'
#  It can result in creating filenames in the database that
#  cannot be seen or restored.


-> UTF8 is the encouraged standard, but the default is SQL_ASCII.

=> This is all a bit contradicting.
   Maybe getting rid of the warning under the assumption all backed up 
filenames are UTF8 is the right choice?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2121318

Title:
  Fresh install of director: Warning: Encoding error for database
  "bacula". Wanted SQL_ASCII, got UTF8

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bacula/+bug/2121318/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to