Author Topic: (solved) wchar_t problem  (Read 8835 times)

Offline PeterP

  • Single posting newcomer
  • *
  • Posts: 6
(solved) wchar_t problem
« on: March 26, 2010, 06:59:47 pm »
hi,
I just installed the official release (with included mingw compiler).
I wanted ro use a library that uses wchar_t strings alot.
but when I try to use special characters like umlauts (äöüßÄÖÜ) like this:
Code
wchar_t wc = L'ä'; // example with single character
I get an error message sying: "converting to execution character set: Invalid argument"

I know I can use escape sequences, but it's hard to read in the source code and I also have to search for the correct hex value for the characters every time what's pretty boring... :(

with normal (char) strings I have no problem, I can enter this characters directly...
so now I'm wondering if I'm something missing to get this chars to work like with normal char strings ???  :shock:

thank you,
Peter
« Last Edit: March 26, 2010, 09:18:55 pm by PeterP »

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: wchar_t problem
« Reply #1 on: March 26, 2010, 07:44:51 pm »
Try to use compiler switch "-finput-charset=<source charset>" in build options. More information about switch -> google :)

Offline PeterP

  • Single posting newcomer
  • *
  • Posts: 6
Re: wchar_t problem
« Reply #2 on: March 26, 2010, 08:15:06 pm »
hahaha, I knew I was missing something !!!  :D
I used -finput-charset=iso-8859-1 and it works now !!!

thank you, very much !!! ;)