Displaying 20 results from an estimated 32 matches for "iconv_close".
2018 Feb 28
0
[PATCH v3 1/2] common: extract UTF-8 conversion function
..._open ("UTF-8", nl_langinfo (CODESET));
- if (ic == (iconv_t) -1)
- return NULL;
-
- len = strlen (input);
- outalloc = len; /* Initial guess. */
-
- again:
- inlen = len;
- outlen = outalloc;
- out = malloc (outlen + 1);
- if (out == NULL) {
- err = errno;
- iconv_close (ic);
- errno = err;
- return NULL;
- }
- inp = input;
- outp = out;
-
- r = iconv (ic, (ICONV_CONST char **) &inp, &inlen, &outp, &outlen);
- if (r == (size_t) -1) {
- if (errno == E2BIG) {
- err = errno;
- prev = outalloc;
- /* Try again with a larger...
2006 Apr 04
0
Need help debugging (long)
...reads. It seems to be a memory
or threading issue. Thanks for any help.
Running smbd through 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_...
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 runni...
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 +++++++++++++++++++++++++
2010 Jul 22
0
Fwd: [PATCH hivex] non-ASCII characters in node names
...L;
-
- /* iconv(3) has an insane interface ... */
-
- /* Mostly UTF-8 will be smaller, so this is a good initial guess. */
size_t outalloc = len;
-
- again:;
- size_t inlen = len;
- size_t outlen = outalloc;
- char *out = malloc (outlen + 1);
- if (out == NULL) {
- int err = errno;
- iconv_close (ic);
- errno = err;
- return NULL;
- }
- char *inp = input;
- char *outp = out;
-
- size_t r = iconv (ic, &inp, &inlen, &outp, &outlen);
- if (r == (size_t) -1) {
- if (errno == E2BIG) {
+ for(;;) {
+ size_t inlen = len;
+ size_t outlen = outalloc;
+ char *o...
2018 Feb 15
3
[PATCH v2 0/2] inspect: basic UTF-8 encoding for rpm
This needs Richard's patch:
https://www.redhat.com/archives/libguestfs/2018-February/msg00099.html
Diff to v1:
* factorized the UTF-8 conversion functions
* small style fixes
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 | 1 +
common/utils/libxml2-utils.c
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
On Fri, Feb 09, 2018 at 01:52:52AM +0100, Hilko Bengen wrote:
> 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...
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 runni...
2008 Feb 20
1
[PATCH] build fix without iconv support
...server.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/options.c b/options.c
inde...
2018 Feb 15
0
[PATCH] Introduce a wrapper around xmlParseURI.
..._open ("UTF-8", nl_langinfo (CODESET));
+ if (ic == (iconv_t) -1)
+ return NULL;
+
+ len = strlen (input);
+ outalloc = len; /* Initial guess. */
+
+ again:
+ inlen = len;
+ outlen = outalloc;
+ out = malloc (outlen + 1);
+ if (out == NULL) {
+ err = errno;
+ iconv_close (ic);
+ errno = err;
+ return NULL;
+ }
+ inp = input;
+ outp = out;
+
+ r = iconv (ic, (ICONV_CONST char **) &inp, &inlen, &outp, &outlen);
+ if (r == (size_t) -1) {
+ if (errno == E2BIG) {
+ err = errno;
+ prev = outalloc;
+ /* Try again with a larger...
2017 Oct 24
2
Binding with libiconv failed while compiling R-devel on Ubuntu 17.04
...*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", "ISO-8859-1" );
iconv_close( cd );
return 0;
}
===
So libiconv seems to be indeed usable, but not during the linking.
Where should I look?
2018 Nov 02
0
[PATCH REPOST] Introduce a wrapper around xmlParseURI.
..._open ("UTF-8", nl_langinfo (CODESET));
+ if (ic == (iconv_t) -1)
+ return NULL;
+
+ len = strlen (input);
+ outalloc = len; /* Initial guess. */
+
+ again:
+ inlen = len;
+ outlen = outalloc;
+ out = malloc (outlen + 1);
+ if (out == NULL) {
+ err = errno;
+ iconv_close (ic);
+ errno = err;
+ return NULL;
+ }
+ inp = input;
+ outp = out;
+
+ r = iconv (ic, (ICONV_CONST char **) &inp, &inlen, &outp, &outlen);
+ if (r == (size_t) -1) {
+ if (errno == E2BIG) {
+ err = errno;
+ prev = outalloc;
+ /* Try again with a larger...
2017 Dec 12
1
[PATCH] Introduce a wrapper around xmlParseURI.
An alternate solution to:
https://www.redhat.com/archives/libguestfs/2017-December/msg00035.html
"[PATCH] v2v: -i vmx: Allow ssh URLs to use spaces."
is to classify all URLs processed by libguestfs as either ordinary
URLs or the special non-standard URLs that we use for things like
‘virt-v2v -i vmx’ and ‘guestfish --add’.
For the non-standard URLs, provide a wrapper around
2017 Aug 09
0
[PATCH v12 04/11] New API: Deprecate hivex_value_utf8 and replace with hivex_value_string.
...L;
-
- /* iconv(3) has an insane interface ... */
-
- /* Mostly UTF-8 will be smaller, so this is a good initial guess. */
- size_t outalloc = len;
-
- again:;
- size_t inlen = len;
- size_t outlen = outalloc;
- char *out = malloc (outlen + 1);
- if (out == NULL) {
- int err = errno;
- iconv_close (ic);
- errno = err;
- return NULL;
- }
- char *inp = input;
- char *outp = out;
-
- const size_t r =
- iconv (ic, (ICONV_CONST char **) &inp, &inlen, &outp, &outlen);
- if (r == (size_t) -1) {
- if (errno == E2BIG) {
- const int err = errno;
- const size_...
2018 Nov 02
2
[PATCH REPOST] Introduce a wrapper around xmlParseURI.
Previously posted:
https://www.redhat.com/archives/libguestfs/2017-December/msg00046.html
Rich.
2018 Feb 14
1
[PATCH] inspector: rpm summary and description may not be utf-8
...4;
+ out_ptr = output;
+
+ res = iconv(cd_utf8_latin1, &in_ptr, &in_left, &out_ptr, &out_left);
+ if (res == (size_t)(-1)) {
+ perrorf(g, "Failed to parse latin-1: '%s'", input);
+ goto cleanup;
+ }
+ }
+
+ result = output;
+
+ cleanup:
+ iconv_close(cd_utf8_utf8);
+ iconv_close(cd_utf8_latin1);
+ if (!result)
+ free(output);
+
+ return result;
+}
+
static int
read_package (guestfs_h *g,
const unsigned char *key, size_t keylen,
@@ -311,7 +372,7 @@ read_package (guestfs_h *g,
struct rpm_name nkey, *entry;
CLEANUP...
2001 Sep 30
3
UTF-8 stuff
..._utf8_encode(from, to, encoding);
- } else {
- perror("iconv_open");
- }
- }
-
- from_left = strlen(from);
- to_left = BUFSIZE;
- from_p = from;
- to_p = buffer;
-
- if(iconv(cd, (ICONV_CONST char **)(&from_p), &from_left, &to_p,
- &to_left) == (size_t)-1)
- {
- iconv_close(cd);
- switch(errno)
- {
- case E2BIG:
- /* if the buffer is too small, try simple_utf8_encode()
- */
- return simple_utf8_encode(from, to, encoding);
- case EILSEQ:
- case EINVAL:
- return 3;
- default:
- perror("iconv");
- }
- }
- else
- {
- iconv_close(cd);
- }
- *to...
2017 Oct 24
0
Binding with libiconv failed while compiling R-devel on Ubuntu 17.04
...har * *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", "ISO-8859-1" );
| iconv_close( cd );
| return 0;
| }
| ===
| So libiconv seems to be indeed usable, but not during the linking.
|
| Where should I look?
Something _must be_ wrong with your machine. We probably need more complete
details of the configure and link steps.
Do you ever have issues with building other...
2010 May 10
1
libdovecot not referencing libiconv
...0beta5/lib/dovecot/libdovecot.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol iconv_open was referenced
from module /usr/local/dovecot2.0beta5/lib/dovecot/libdovecot.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol iconv_close was referenced
from module /usr/local/dovecot2.0beta5/lib/dovecot/libdovecot.so(), but a runtime definition
of the symbol was not found.
To fix this I did:
--- a/src/lib-dovecot/Makefile.am Mon May 10 12:05:58 2010 -0400
+++ b/src/lib-dovecot/Makefile.am Mon May 10 12:31:...
2009 May 13
1
dovecot 2.0 (revision 9271:d467712aee77) compile problems on AIX 5.3
...OR: Undefined symbol: .rfc822_parse_mime_token
ld: 0711-317 ERROR: Undefined symbol: .rfc822_parse_atom
ld: 0711-317 ERROR: Undefined symbol: .message_address_parse
ld: 0711-317 ERROR: Undefined symbol: .iconv
ld: 0711-317 ERROR: Undefined symbol: .iconv_open
ld: 0711-317 ERROR: Undefined symbol: .iconv_close
I add this ../lib-charset/.libs/libcharset.a -liconv to the Makefiles
(./src/lib-imap/Makefile;./src/lib-index/Makefile;./src/lib-mail/
Makefile)
below:
$ find . -name Makefile -exec egrep -p libcharset.a {} \; -print
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p i...