reg_ldb_unpack_value: Change "CH_UTF8" in "CH_UNIX"
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 12 Sep 2008 16:36:04 +0000 (18:36 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 21 Oct 2008 12:40:40 +0000 (14:40 +0200)
It's better to use "CH_UNIX" for unpacking, because the system charset doesn't have to be UTF8 and we should be compatible with "reg_ldb_pack_value".

source4/lib/registry/ldb.c

index e4037b1d90c2484e0d79d0eb7ad39e67496f736e..18054ac89b6cd19f39c4fe7351927f26923c798e 100644 (file)
@@ -59,7 +59,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
        {
        case REG_SZ:
        case REG_EXPAND_SZ:
-               data->length = convert_string_talloc(mem_ctx, iconv_convenience, CH_UTF8, CH_UTF16,
+               data->length = convert_string_talloc(mem_ctx, iconv_convenience, CH_UNIX, CH_UTF16,
                                                     val->data, val->length,
                                                     (void **)&data->data);
                break;