Skip to content

Commit 544a3c9

Browse files
Merge pull request #18 from theseus-rs/use-utf8-on-windows
chore: update windows to use UTF8 to align with other operating systems and utilize capabilities of the newer releases from https://github.com/theseus-rs/postgresql-binaries
2 parents e3d7046 + 42202ff commit 544a3c9

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/codecov.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
coverage:
2+
status:
3+
patch:
4+
default:
5+
threshold: 0.05%
6+
project:
7+
default:
8+
threshold: 0.05%

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ resolver = "2"
77
authors = ["Brian Heineman <brian.heineman@gmail.com>"]
88
categories = ["database"]
99
edition = "2021"
10-
keywords = ["postgresql", "postgres", "database"]
10+
keywords = ["postgresql", "postgres", "embedded", "database", "server"]
1111
license = "(Apache-2.0 OR MIT) AND PostgreSQL"
1212
repository = "https://github.com/theseus-rs/postgresql-embedded"
1313
version = "0.4.0"

postgresql_embedded/src/postgresql.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,19 +228,13 @@ impl PostgreSQL {
228228
self.settings.data_dir.to_string_lossy()
229229
);
230230

231-
let encoding = if cfg!(target_os = "windows") {
232-
"SQL_ASCII"
233-
} else {
234-
"UTF8"
235-
};
236-
237231
let initdb = InitDbBuilder::new()
238232
.program_dir(self.settings.binary_dir())
239233
.pgdata(&self.settings.data_dir)
240234
.auth("password")
241235
.pwfile(&self.settings.password_file)
242236
.username(&self.settings.username)
243-
.encoding(encoding);
237+
.encoding("UTF8");
244238

245239
self.status = Status::Initializing;
246240
match self.execute_command(initdb).await {

0 commit comments

Comments
 (0)