ksud: fix encoding error
This commit is contained in:
1
userspace/ksud/Cargo.lock
generated
1
userspace/ksud/Cargo.lock
generated
@@ -421,6 +421,7 @@ dependencies = [
|
|||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
"const_format",
|
"const_format",
|
||||||
|
"encoding",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"java-properties",
|
"java-properties",
|
||||||
"log",
|
"log",
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ env_logger = "0.10.0"
|
|||||||
serde = { version = "1.0" }
|
serde = { version = "1.0" }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
regex = "1.5.4"
|
regex = "1.5.4"
|
||||||
|
encoding = "0.2.33"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
strip = true
|
strip = true
|
||||||
|
|||||||
@@ -374,7 +374,9 @@ fn do_list_modules(path: &str) -> Vec<HashMap<String, String>> {
|
|||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
let mut module_prop_map = HashMap::new();
|
let mut module_prop_map = HashMap::new();
|
||||||
let result = PropertiesIter::new(Cursor::new(content)).read_into(|k, v| {
|
let encoding = encoding::all::UTF_8;
|
||||||
|
let result =
|
||||||
|
PropertiesIter::new_with_encoding(Cursor::new(content), encoding).read_into(|k, v| {
|
||||||
module_prop_map.insert(k, v);
|
module_prop_map.insert(k, v);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user