From: Matthias Dieter Wallnöfer Date: Thu, 18 Sep 2008 17:52:52 +0000 (+0200) Subject: Registry server LDB backend REG_SZ type: Always use UTF8 encoding X-Git-Tag: samba-4.0.0alpha6~782 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=828b033345a93d8d4273dd32265f14b4164fc1e0;p=thirdparty%2Fsamba.git Registry server LDB backend REG_SZ type: Always use UTF8 encoding We should save data OS independent in the LDB files. --- diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 386da2b12c0..53ec076db3f 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);