How to use libiconv ?
I tried so, but does not work:
Code: Select all
#include "crt/iconv.bi"
dim as wstring ptr wstr0 = @("Hello")
dim as wstring ptr wstr1 = @wstr0
dim as any ptr ic = iconv_open("UTF-8", "UTF-16" )
dim as zstring ptr psz0 = allocate(50)
dim as zstring ptr psz1 = @psz0
dim as long l1 = len(*wstr0),l2 = len(*wstr0)
iconv(ic, @psz1, @l1, @wstr1, @l2)
iconv_close(ic)
? *psz0
sleep