# Libiconv and errno (Win32)

- Thread: https://externals.io/message/1643
- Original archive: https://news-web.php.net/php.internals/1643
- Started by l0t3k on 2003-05-17T23:50:54+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1643 — l0t3k — 2003-05-17T23:50:54+00:00

URL: https://externals.io/message/1643#1643

im developing an extension under Win32 which links to libiconv, but i'm
having a slight problem. i have a conversion which fails (iconv returns
(size_t)-1), but errno is set to 0.
   any clues as to what is happening ?

not that it matters, but the conversion is from ISO-8859-1 to UTF-16 .


l0t3k

---

## #1648 — Moriyoshi Koizumi — 2003-05-18T01:12:03+00:00

URL: https://externals.io/message/1643#1648 · In reply to: #1643

Hi,

"l0t3k" <cshmoove@bellsouth.net> wrote:

> im developing an extension under Win32 which links to libiconv, but i'm
> having a slight problem. i have a conversion which fails (iconv returns
> (size_t)-1), but errno is set to 0.
>    any clues as to what is happening ?
> 
> not that it matters, but the conversion is from ISO-8859-1 to UTF-16 .

That's most likely iconv.dll and your extension are linked to different 
libc dlls since errno variable is both dll specific and thread specific.  
It also fails to set a correct value to errno if your iconv.dll is 
statically linked to MS libc.

Moriyoshi

---

## #1649 — l0t3k — 2003-05-18T01:24:27+00:00

URL: https://externals.io/message/1643#1649 · In reply to: #1648

thanks for the quick response. i guess i have some digging to do. by the
way, how far along is the new mbstring ? libiconv is not too convenient or
smart on chunked conversions (which is where my problem lies) my last look a
mbstring made me believe that this is something you consciously address.
since my extension is ZE2 specific, i have some time to play with.

l0t3k

"Moriyoshi Koizumi" <moriyoshi@at.wakwak.com> wrote in message
news:20030518101203WUqOgo@at.wakwak.com...
> Hi,
>
> "l0t3k" <cshmoove@bellsouth.net> wrote:

---

## #1650 — l0t3k — 2003-05-18T01:31:53+00:00

URL: https://externals.io/message/1643#1650 · In reply to: #1648

thanks for the quick response. i guess i have some digging to do. by the
way, how far along is the new mbstring ? libiconv is not too convenient or
smart on chunked conversions (which is where my problem lies) my last look a
mbstring made me believe that this is something you consciously address.
since my extension is ZE2 specific, i have some time to play with.

l0t3k

"Moriyoshi Koizumi" <moriyoshi@at.wakwak.com> wrote in message
news:20030518101203WUqOgo@at.wakwak.com...
> Hi,
>
> "l0t3k" <cshmoove@bellsouth.net> wrote:
