diff --git a/docs/changelog.txt b/docs/changelog.txt index 6e5a3ceb..8ea4996e 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,6 +2,12 @@ Changelog ######### +Version 0.15.2 +============== + +* Fix problem with database init script. Now it uses the database charset instead default + UTF8. The UTF8 is used only when database charset is not specified. + Version 0.15.1 ============== diff --git a/docs/conf.py b/docs/conf.py index b0d580b8..d829ff76 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,10 +23,10 @@ copyright = '2022, Pavel Cisar' author = 'Pavel Císař' # The short X.Y version -version = '0.15.1' +version = '0.15.2' # The full version, including alpha/beta/rc tags -release = '0.15.1' +release = '0.15.2' # -- General configuration --------------------------------------------------- diff --git a/firebird/qa/plugin.py b/firebird/qa/plugin.py index 1a0ae37f..7319f6e6 100644 --- a/firebird/qa/plugin.py +++ b/firebird/qa/plugin.py @@ -652,10 +652,16 @@ class Database: """ __tracebackhide__ = True - result = run([_vars_['isql'], '-ch', 'UTF8', '-user', self.user, - '-password', self.password, str(self.dsn)], - input=substitute_macros(script, self.subs), - encoding='utf8', capture_output=True) + params = [_vars_['isql'], '-user', self.user, '-password', self.password] + if self.charset != 'NONE': + params.extend(['-ch', self.charset]) + io_enc = CHARSET_MAP[self.charset] + else: + params.extend(['-ch', 'utf8']) + io_enc = 'utf8' + params.append(str(self.dsn)) + result = run(params, input=substitute_macros(script, self.subs), encoding=io_enc, + capture_output=True) if result.returncode: print(f"-- stdout {'-' * 20}") print(result.stdout) diff --git a/setup.cfg b/setup.cfg index 7aa8c791..cbb33daf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,7 @@ all-files=True [metadata] name = firebird-qa -version = 0.15.1 +version = 0.15.2 description = pytest plugin for Firebird QA long_description = file: README.rst long_description_content_type = text/x-rst; charset=UTF-8