Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #5696] Default database encoding auto results in broken unicode in database #1439

Closed
icinga-migration opened this issue Feb 26, 2014 · 7 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/5696

Created by mfrosch on 2014-02-26 08:14:39 +00:00

Assignee: (none)
Status: New
Target Version: Backlog
Last Update: 2015-08-04 18:58:29 +00:00 (in Redmine)

Icinga Version: 1.10.0
OS Version: any

I noticed a weird behavior, maybe a bug with libdbi itself.

IDO2DB connects to a database, specifying encoding as "auto".

This results in Debian wheezy and jessie to the following result:

hostgroup_alias: Testsörver
status.dat: Testsörver
IDO: Testsörver

Looks like the database connection thinks its input is latin, and converts it to unicode.

Question is, how can we investigate this, is it a bug in libdbi or our problem?

db.c

dbi_conn_set_option(idi->dbinfo.dbi_conn, "encoding", "auto");
@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-03-04 10:09:02 +00:00

An encoding config option would be useful for that. However, we should not change the default encoding to UTF-8 as that would require all strings we use in DB queries to be valid UTF-8 strings. This includes object names, comments, commands, etc. and will likely break (e.g. when users create comments with ISO-8859-1 characters that are outside the ASCII range (0-127)).

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-03-07 10:28:27 +00:00

  • Status changed from New to Feedback
  • Assigned to set to mfrosch
  • Target Version deleted 1.11

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-19 12:29:39 +00:00

  • Priority changed from Normal to Low

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 14:47:05 +00:00

  • Project changed from 18 to Core, Classic UI, IDOUtils
  • Category changed from 79 to IDOUtils
  • Icinga Version changed from 1 to 1
  • OS Version set to any

@icinga-migration
Copy link
Author

Updated by berk on 2015-05-18 12:17:56 +00:00

  • Target Version set to Backlog

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-04 15:17:33 +00:00

  • Assigned to deleted mfrosch

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-08-04 18:58:29 +00:00

  • Status changed from Feedback to New

@icinga-migration icinga-migration added this to the Backlog milestone Jan 17, 2017
@dnsmichi dnsmichi removed this from the Backlog milestone Dec 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants