Search code examples
linuxopensuseiconv

iconv_open support on Open Suse Leap 15.1 for 32-Bit executables


If I compile the following code sample as 32-bit executable (gcc -m32 test.cpp - on a Ubuntu) and try to run it on Open Suse Leap 15.1 it returns an "Invalid argument" error. Compiled as 64-bit binary it returns success.

Is there a way to get the 32-bit example get working? E.g install missing packages,... Is the conversion no longer supported?

test.cpp:

#include <stdio.h>
#include <iconv.h>

int main()
{
  if (iconv_open("UTF-32LE", "UTF-8") == ((iconv_t) -1))
    perror(0);
  else
    printf("Success\n");
}

Solution

  • Installation of package glibc-locale-base-32bit solved the problem.