mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Release 0.15.2. Fixed DB init script encoding/charset
This commit is contained in:
parent
7d0bbb838c
commit
bfc92a15fa
@ -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
|
||||
==============
|
||||
|
||||
|
@ -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 ---------------------------------------------------
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user