Author Topic: ISO-8859-1 to UTF-8, iconv problem  (Read 8166 times)

Offline Viking

  • Single posting newcomer
  • *
  • Posts: 2
ISO-8859-1 to UTF-8, iconv problem
« on: January 14, 2009, 10:18:57 pm »
Hello everybody.

I've just changed my computer, and I installed the 8.0.2 version of CodeBlocks / wxWidgets 2.8.9 / MinGW 3.81. I compiled CB and wxWidgets and used the binaries of MinGW.

I've tried to recompile a program I did with the same IDE one year ago, more or less, that still compiles perfectly in my other computer. When I try to compile it I receive this error:

Code
no iconv implementation, cannot convert from iso-8859-1 to UTF-8

I remember I had problems compiling this program (because it has local characters like "è, ô, ...") and that I fixed it by using the parameter "-finput-charset=iso-8859-1" to the compiler. Now, I've tried to remove this parameter to see if it fixed my new problem, but then I receive the error:

Code
converting to execution character set: Illegal byte sequence

Which was the error that made me use the charset parameter.

I've searched the forum and I've tried to changed the Edit -> File encoding, but it didn't fix it (with or without the -finput-charset parameter). I've read a solution which involves to manually change the source files to UTF format, but I guess that, if I do that, then they won't work in my other computer. They are too many to change, but I'll do it as a last resort.

I hope there is a quick solution to this error, probably related to the way I compiled CB and wxWidgets (I used UNICODE=1).

Please, could somebody help me?

Thanks in advance!

Offline Viking

  • Single posting newcomer
  • *
  • Posts: 2
Re: ISO-8859-1 to UTF-8, iconv problem
« Reply #1 on: January 15, 2009, 07:48:58 pm »
Well, I've tried many things, like updating C::B to the SVN version, messing here and there in the options... and, in the end, the problem was in MinGW (the one I didn't compile). It looks like it was compiled without libiconv. The problem came from the file MinGW\libexec\gcc\mingw32\3.4.5\cc1plus.exe. By replacing it with the one I had from the other computer (the one that worked well) there is no iconv problem. I'll probably return to the whole older version of MinGW to prevent problems of this kind.

Anyway, thanks for reading!