Groups | Search | Server Info | Login | Register
Groups > comp.os.os2.programmer.porting > #52
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Dave Yeo <dave.r.yeo@gmail.com> |
| Newsgroups | comp.os.os2.programmer.porting |
| Subject | Re: Problem: error in iconv_open |
| Date | Sun, 05 Jun 2011 15:16:10 -0700 |
| Organization | Aioe.org NNTP Server |
| Lines | 75 |
| Message-ID | <isgv7e$n3p$1@speranza.aioe.org> (permalink) |
| References | <0KhBVN5juOdd-pn2-Od3ScT2CWGXd@neo_iii> |
| NNTP-Posting-Host | e6GCisbAl57t5vi4mK4MKA.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (OS/2; Warp 4.5; rv:2.0.2pre) Gecko/20110603 Firefox/4.0.2pre SeaMonkey/2.1.1pre |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | x330-a1.tempe.blueboxinc.net comp.os.os2.programmer.porting:52 |
Show key headers only | View raw
Mentore Siesto wrote:
> Hello all, this is a rather strange problem.
>
> I was asked recently to try and port AESCrypt
>
> http://www.aescrypt.com/linux_aes_crypt.html
>
> make went fine after modifying the makefile. After making the
> executable file, though, testing it will always give me this:
>
> [U:\progetti\aescrypt305_source\src]make -f makefile.os2 testfile
> ./aescrypt -e -p "praxis" test.orig.txt
> Error in iconv_open: Invalid argument
> make: *** [testfile] Error 255
>
> Searching the password.c file (which contains iconv_open) I came
> across these sentences:
>
> /*
> * passwd_to_utf16
> *
> * Convert String to UTF-16LE for windows compatibility
> */
> int passwd_to_utf16(char *in_passwd,
> int length,
> int max_length,
> char *out_passwd)
> {
> char *ic_outbuf,
> *ic_inbuf;
> iconv_t condesc;
> size_t ic_inbytesleft,
> ic_outbytesleft;
>
> ic_inbuf = in_passwd;
> ic_inbytesleft = length;
> ic_outbytesleft = max_length;
> ic_outbuf = out_passwd;
>
> if ((condesc = iconv_open("UTF-16LE", nl_langinfo(CODESET))) ==
> (iconv_t)(-1))
> {
> perror("Error in iconv_open");
> return -1;
> }
>
> The remainder of the function calls iconv to convert the given
> password and use it.
>
> It seems that the error is caused by the nl_langinfo(CODESET) call,
> which gives (on my system) "en_US"; this seems to cause the iconv_open
> error.
>
> Of course I tried substituting it with other ideas, like using getenv
> to retrieve the locale, but still got errors.
>
> I tried to learn how iconv and iconv_open work, but it seems rather
> confusing to me.
>
> Would someone of you be so kind to suggest me a way to circumvent this
> problem? Having AES Crypt available would be useful.
>
> Thanks in advance!
> Mentore
What iconv are you using? Not all iconv implementations are equal and
the one that is in klibc is slightly different then GNU libiconv. Some
configure scripts test for this and have different code for different
implementations.
When building for my personal use I often just do configure
--disable-iconv, if that isn't an option you could bypass the convert to
UTF16 function as it doesn't make much sense on OS/2 or install GNU
libiconv, there is a version here,
http://bauxite.sakura.ne.jp/software/os2/#libiconv that I've never tested.
Dave
Back to comp.os.os2.programmer.porting | Previous | Next — Previous in thread | Next in thread | Find similar
Problem: error in iconv_open "Mentore Siesto" <mentoreshoryu@fattimiei.zx> - 2011-06-05 20:22 +0000
Re: Problem: error in iconv_open Dave Yeo <dave.r.yeo@gmail.com> - 2011-06-05 15:16 -0700
Re: Problem: error in iconv_open KO Myung-Hun <komh@chollian.net> - 2011-06-06 22:50 +0900
Re: Problem: error in iconv_open "Mentore Siesto" <mentoreshoryu@fattimiei.zx> - 2011-06-06 20:40 +0000
Re: Problem: error in iconv_open "Mentore Siesto" <mentoreshoryu@fattimiei.zx> - 2011-06-06 20:45 +0000
Re: Problem: error in iconv_open Dave Yeo <dave.r.yeo@gmail.com> - 2011-06-06 16:41 -0700
Re: Problem: error in iconv_open "Mentore Siesto" <mentoreshoryu@fattimiei.zx> - 2011-06-19 16:40 +0000
Re: Problem: error in iconv_open Dave Yeo <dave.r.yeo@gmail.com> - 2011-06-19 11:30 -0700
Re: Problem: error in iconv_open Ilya Zakharevich <nospam-abuse@ilyaz.org> - 2011-06-22 21:56 +0000
Re: Problem: error in iconv_open "Mentore Siesto" <mentoreshoryu@fattimiei.zx> - 2011-07-09 10:37 +0000
Re: SOLVED!: Problem: error in iconv_open "Mentore Siesto" <mentoreshoryu@fattimiei.zx> - 2011-07-10 18:24 +0000
Re: SOLVED!: Problem: error in iconv_open "Lars Erdmann" <lars.erdmann@arcor.de> - 2011-07-10 20:41 +0200
Re: SOLVED!: Problem: error in iconv_open "Mentore Siesto" <mentoreshoryu@fattimiei.zx> - 2011-07-10 22:33 +0000
Re: SOLVED!: Problem: error in iconv_open vsvidya7@gmail.com - 2013-01-21 03:00 -0800
Re: SOLVED!: Problem: error in iconv_open Dave Yeo <dave.r.yeo@gmail.com> - 2011-07-10 12:07 -0700
Re: Problem: error in iconv_open Ilya Zakharevich <nospam-abuse@ilyaz.org> - 2011-06-08 00:45 +0000
Re: Problem: error in iconv_open "Mentore Siesto" <mentoreshoryu@fattimiei.zx> - 2011-06-08 20:49 +0000
Re: Problem: error in iconv_open piesse <piesse@despammed.com> - 2011-06-09 22:28 +0200
Re: Problem: error in iconv_open Mentore <mentore.siesto@libero.it> - 2011-06-13 03:33 -0700
csiph-web