summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2008-09-18 19:52:52 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-21 14:40:42 +0200
commit828b033345a93d8d4273dd32265f14b4164fc1e0 (patch)
treeeae1ffb156bceca9b013deea37ed56161e4cb5b3 /source4/lib/registry
parent47868196b8f989492e0e5c47f384a713791be683 (diff)
downloadsamba-828b033345a93d8d4273dd32265f14b4164fc1e0.tar.gz
samba-828b033345a93d8d4273dd32265f14b4164fc1e0.tar.bz2
samba-828b033345a93d8d4273dd32265f14b4164fc1e0.zip
Registry server LDB backend REG_SZ type: Always use UTF8 encoding
We should save data OS independent in the LDB files.
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/ldb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 386da2b12c..53ec076db3 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -61,7 +61,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
case REG_SZ:
case REG_EXPAND_SZ:
if (val != NULL)
- data->length = convert_string_talloc(mem_ctx, iconv_convenience, CH_UNIX, CH_UTF16,
+ data->length = convert_string_talloc(mem_ctx, iconv_convenience, CH_UTF8, CH_UTF16,
val->data, val->length,
(void **)&data->data);
else {
@@ -106,7 +106,7 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx,
case REG_SZ:
case REG_EXPAND_SZ:
if (data.data[0] != '\0') {
- val.length = convert_string_talloc(mem_ctx, lp_iconv_convenience(global_loadparm), CH_UTF16, CH_UNIX,
+ val.length = convert_string_talloc(mem_ctx, lp_iconv_convenience(global_loadparm), CH_UTF16, CH_UTF8,
(void *)data.data,
data.length,
(void **)&val.data);