[fpc-devel] iconv unit/problem

Marco van de Voort marcov at stack.nl
Wed Jul 16 09:28:08 CEST 2008


> On Tue, 15 Jul 2008, Marco van de Voort wrote:
> 
> > because there are several bugreports asking for an iconv header
> > translations, and one contained a patch from Whitewind which I tried to
> > cleanup and get working.
> > 
> > I now have a bit of an odd problem with it that it seems to decode one char
> > less than the input specifies.
> 
> Shouldn't you make allowances for the terminating #0 ?

It's the input, not the output. It does this even when you set the output
buffer really high. The man page doesn't mention a #0, and the behaviour is
the same on Linux and FreeBSD so I assume intentional.

> And doesn't a text file have a unicode marker at the start ?

It goes wrong before I/O, and the input is not unicode but text in a
codepage.



More information about the fpc-devel mailing list