search for: iconv_t

Displaying 20 results from an estimated 76 matches for "iconv_t".

2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...te: > It was brought to my attention that dumping a registry hive causes a > lot of time spent in disk I/O activity because iconv_open() and > iconv_close() are called for every key. Every iconv_open() call causes > /usr/lib/.../gconv/$ENCODING.so to be opened and mapped. > > The iconv_t handles are now cached in the hive_h struct; they are > opened on-demand and re-used. > > On my ~10 year old Lenovo T60, I have seen 57% savings in the overal > runtime of running > > hivexregedit --export windows-8-enterprise-software.hive '\\' > --- > lib/han...
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
It was brought to my attention that dumping a registry hive causes a lot of time spent in disk I/O activity because iconv_open() and iconv_close() are called for every key. Every iconv_open() call causes /usr/lib/.../gconv/$ENCODING.so to be opened and mapped. The iconv_t handles are now cached in the hive_h struct; they are opened on-demand and re-used. On my ~10 year old Lenovo T60, I have seen 57% savings in the overal runtime of running hivexregedit --export windows-8-enterprise-software.hive '\\' --- bootstrap | 1 + configure.ac...
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
It was brought to my attention that dumping a registry hive causes a lot of time spent in disk I/O activity because iconv_open() and iconv_close() are called for every key. Every iconv_open() call causes /usr/lib/.../gconv/$ENCODING.so to be opened and mapped. The iconv_t handles are now cached in the hive_h struct; they are opened on-demand and re-used. On my ~10 year old Lenovo T60, I have seen 57% savings in the overal runtime of running hivexregedit --export windows-8-enterprise-software.hive '\\' --- lib/handle.c | 43 ++++++++++++++++++++...
2010 Jul 22
0
Fwd: [PATCH hivex] non-ASCII characters in node names
...0) { + ret = windows_latin1_to_utf8(nk->name, len); + } else { + ret = windows_utf16_to_utf8(nk->name, len); + } return ret; } @@ -1113,6 +1111,7 @@ hivex_node_get_value (hive_h *h, hive_node_h node, const char *key) char * hivex_value_key (hive_h *h, hive_value_h value) { + iconv_t ic; if (!IS_VALID_BLOCK (h, value) || !BLOCK_ID_EQ (h, value, "vk")) { errno = EINVAL; return 0; @@ -1120,10 +1119,6 @@ hivex_value_key (hive_h *h, hive_value_h value) struct ntreg_vk_record *vk = (struct ntreg_vk_record *) (h->addr + value); - /* AFAIK the key is...
2018 Feb 10
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
On Sat, Feb 10, 2018 at 01:40:36AM +0100, Hilko Bengen wrote: > * Richard W.M. Jones: > > >> +threadlib > >> ' > > > > Probably better to keep these sorted. > > When I rebuilt from scratch, it turned out that threadlib was not > enough. Using the "lock" module with the gl_lock_{init,lock,unlock} > instead of
2001 Mar 28
1
UTF-8 patch for Samba 2.0.7
...222\365\223\366\206\367\202"); -update_map("\370\234\371\233\372\207\373\230\374\235\375\231\376\227\377\232"); -} - - -/* Init for ROMAN-8 (HP-UX) */ - -static void init_roman8(void) { +extern int DEBUGLEVEL; +char local_nls[MAXNLSLEN]; +char remote_nls[MAXNLSLEN]; - setupmaps(); +iconv_t d2u_descriptor=(iconv_t)-1, u2d_descriptor=(iconv_t)-1; -/* MSDOS Code Page 850 -> ROMAN8 */ -update_map("\240\377\241\267\242\266\243\324\244\322\245\323\246\327\247\330"); -update_map("\250\357\253\371\255\353\256\352\257\234"); -update_map("\260\356\261\355\262\354\...
2005 Jul 13
0
Search with specified charset
....0-stable/src/lib-charset/charset-iconv.c.orig Mon Jan 31 16:37:55 2005 +++ dovecot-1.0-stable/src/lib-charset/charset-iconv.c Wed Jul 13 21:47:03 2005 @@ -36,9 +36,17 @@ ascii = FALSE; cd = iconv_open("UTF-8", charset); if (cd == (iconv_t)-1) { - if (unknown_charset != NULL) - *unknown_charset = TRUE; - return NULL; + /* Try matching charset without "ISO" prefix */ + if (strncasecmp(charset, "ISO-&quot...
2008 Feb 20
1
[PATCH] build fix without iconv support
...ntserver.c b/clientserver.c index 2d7c28f..694a72d 100644 --- a/clientserver.c +++ b/clientserver.c @@ -806,6 +806,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host) exit_cleanup(RERR_UNSUPPORTED); } +#ifdef ICONV_OPTION if (!iconv_opt) { if (ic_send != (iconv_t)-1) { iconv_close(ic_send); @@ -816,6 +817,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host) ic_recv = (iconv_t)-1; } } +#endif if (!numeric_ids && (use_chroot ? lp_numeric_ids(i) != False : lp_numeric_ids(i) == True)) diff --git a/opt...
2018 Feb 14
1
[PATCH] inspector: rpm summary and description may not be utf-8
...+ * http://rpm.org/devel_doc/file_format.html#24-header-format */ /* The minimum header size that makes sense here is 24 bytes. Four @@ -301,6 +302,66 @@ struct read_package_data { struct guestfs_application2_list *apps; }; +static char * +to_utf8 (guestfs_h *g, char *input) +{ + iconv_t cd_utf8_utf8 = (iconv_t)(-1); + iconv_t cd_utf8_latin1 = (iconv_t)(-1); + size_t in_left, out_left, res; + char *in_ptr; + char *out_ptr; + char *output = NULL; + char *result = NULL; + + cd_utf8_utf8 = iconv_open("UTF-8", "UTF-8"); + if (cd_utf8_utf8 == (iconv_t)(-1)) {...
2017 Oct 24
2
Binding with libiconv failed while compiling R-devel on Ubuntu 17.04
...ecking for iconv.h... yes checking for iconv... yes checking whether iconv accepts "UTF-8", "latin1", "ASCII" and "UCS-*"... yes checking for iconvlist... no checking for iconv... yes checking for iconv declaration... extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); === The command iconv -l seems to work fine. This C file compiles with no problem either: === #include <iconv.h> int main( int argc, char **argv ) { iconv_t cd = iconv_open( "UTF-8", "I...
2006 Apr 04
0
Need help debugging (long)
...gdb: Breakpoint 6, charset_name (ch=CH_DISPLAY) at lib/charcnv.c:57 57 const char *ret = NULL; (gdb) Continuing. Substituting charset 'ANSI_X3.4-1968' for LOCALE Breakpoint 2, smb_iconv_close (cd=0x8412a28) at lib/iconv.c:315 315 if (cd->cd_direct) iconv_close((iconv_t)cd->cd_direct); (gdb) Continuing. Breakpoint 3, iconv_close (cd=0x8412a50) at iconv_close.c:30 30 if (__builtin_expect (cd == (iconv_t *) -1L, 0)) (gdb) Continuing. smbd: gconv_db.c:232: __gconv_release_step: Assertion `step->__end_fct == ((void *)0)' failed. Program received sig...
2018 Feb 28
0
[PATCH v3 1/2] common: extract UTF-8 conversion function
...ULL; @@ -113,66 +109,3 @@ guestfs_int_parse_nonstandard_uri (const char *arg) return ret; } - -/* Would be const, but the interface to iconv is not const-correct on - * all platforms. The input string is not touched. - */ -static char * -local_string_to_utf8 (/* const */ char *input) -{ - iconv_t ic; - size_t len, inlen, outlen, outalloc, r, prev; - int err; - char *out, *inp, *outp; - - /* Convert from input locale to UTF-8. */ - ic = iconv_open ("UTF-8", nl_langinfo (CODESET)); - if (ic == (iconv_t) -1) - return NULL; - - len = strlen (input); - outalloc = len;...
2013 Nov 22
0
[PATCH 3/3] Correctly handle latin1-encoded key/value names
...b/lib/utf16.c index 844715c..eca2343 100644 --- a/lib/utf16.c +++ b/lib/utf16.c @@ -29,15 +29,14 @@ #include "hivex-internal.h" char * -_hivex_windows_utf16_to_utf8 (/* const */ char *input, size_t len) +_hivex_to_utf8 (/* const */ char *input, size_t len, char* input_encoding) { - iconv_t ic = iconv_open ("UTF-8", "UTF-16LE"); + iconv_t ic = iconv_open ("UTF-8", input_encoding); if (ic == (iconv_t) -1) return NULL; /* iconv(3) has an insane interface ... */ - /* Mostly UTF-8 will be smaller, so this is a good initial guess. */ size_t...
2007 Sep 18
1
DO NOT REPLY [Bug 4981] New: iconv confusion
...rary. The make dies with: gcc -std=gnu99 -g -O2 -DMAINTAINER_MODE -DHAVE_CONFIG_H -Wall -W -I./popt -o mkrounding -I. ./mkrounding.c In file included from ./rsync.h:839, from ./mkrounding.c:20: ./proto.h:258: error: parse error before 'ic' proto.h:258 is: int iconvbufs(iconv_t ic, xbuf *in, xbuf *out, int flags); Apparently iconv_t isn't getting defined. iconv_t is part of the iconv library and iconv.h. In rsync.h:368 iconv.h is conditionalized by this line: #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H #include <iconv.h> After a little experim...
2013 Nov 24
4
[PATCH 1/3] lib: Further generalize iconv wrapper function.
...b/lib/utf16.c @@ -29,18 +29,19 @@ #include "hivex-internal.h" char * -_hivex_to_utf8 (/* const */ char *input, size_t len, char* input_encoding) +_hivex_recode (char *input_encoding, const char *input, size_t input_len, + char *output_encoding, size_t *output_len) { - iconv_t ic = iconv_open ("UTF-8", input_encoding); + iconv_t ic = iconv_open (output_encoding, input_encoding); if (ic == (iconv_t) -1) return NULL; /* iconv(3) has an insane interface ... */ - size_t outalloc = len; + size_t outalloc = input_len; again:; - size_t inlen = l...
2008 Feb 26
4
rsync-3.0.0pre10 and iconv
Hello, I am trying to get rsync-3.0.0pre10 --iconv option working between two linux hosts in local network. The client host is running Fedora Core 4 (kernel 2.6.17) and is using iso8859-1 character set. LANG=en_US The daemon host is running Centos 5 (kernel 2.6.18) and is using utf-8 character set. LANG=en_US.UTF-8 Rsync is transferring files properly without --iconv switch: fc4: (connected
2011 Nov 22
2
[LLVMdev] VMKit GNU classpath configure
....2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no checking for shared library run path origin... /bin/sh: ./config.rpath: No such file or directory done checking for iconv... yes checking how to link with libiconv... -liconv checking for iconv declaration... extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking for X... no configure: error: GTK+ peers requested but no X library available when running: ./configure --disable-plugin --disable-examples --disable-Werror On: OS X 10.7.2 with devel version: Apple clang...
2018 Feb 28
2
[PATCH v3 0/2] inspect: basic UTF-8 encoding for rpm
Diff to v2: * inlined local_string_to_utf8 Cédric Bosdonnat (2): common: extract UTF-8 conversion function inspector: rpm summary and description may not be utf-8 common/utils/guestfs-utils.h | 11 +++++ common/utils/libxml2-utils.c | 69 +-------------------------- common/utils/utils.c | 64 +++++++++++++++++++++++++
2013 Nov 22
4
[PATCH 1/3] Document ntreg_nk_record.flags
--- lib/hivex-internal.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h index f391b98..d7ce339 100644 --- a/lib/hivex-internal.h +++ b/lib/hivex-internal.h @@ -125,7 +125,19 @@ struct ntreg_hbin_block { struct ntreg_nk_record { int32_t seg_len; /* length (always -ve because used) */ char id[2];
2017 Oct 24
0
Binding with libiconv failed while compiling R-devel on Ubuntu 17.04
...conv.h... yes | checking for iconv... yes | checking whether iconv accepts "UTF-8", "latin1", "ASCII" and "UCS-*"... yes | checking for iconvlist... no | checking for iconv... yes | checking for iconv declaration... | extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | === | The command iconv -l seems to work fine. This C file compiles with no problem either: | === | #include <iconv.h> | | int main( int argc, char **argv ) { | iconv_t cd = iconv_open( "UTF-8&...