setlocale does not work on RAD Studio C++ Builder apllication console

Asked

Viewed 54 times

0

#pragma hdrstop
#pragma argsused

#include <stdio.h>
#include <locale.h>

#ifdef _WIN32
#include <tchar.h>
#else
  typedef char _TCHAR;
  #define _tmain main
#endif

int _tmain(int argc, _TCHAR* argv[])
{


    setlocale(LC_ALL, "portuguese");
  • 1
  • For this case, there is no duplicity in questioning. Because I am using Embarcadero’s IDE RAD Studio C++ Builder.

  • The problem is the same, setlocale will not work anywhere for the same problems mentioned in the answer to the other question. The question is not RAD the question is Windows. Unless you’re talking about a very different error, but since there are no details in the question then I assume the error is the strange characters like this: Utilizando caracteres e acentuação da língua portuguesa! if is not for character problem then edit your question and explain.

  • I think the problem is in RAD itself, because in I use Codeblocks, and in it this command works.

  • Codeblocks is not compiler is IDE, the compiler in it must be Mingw, I have Mingw here and the problem also occurred, your mingw must have seemed to work due to some Codeblocks preconfiguration

  • Yes, in Codeblocks I use Mingw too, I started using RAD these days, and in it this command does not work. All the material I find is in Russian, Mandarin or some language I don’t know.

  • As I said, your codeblocks should have a preconfiguration for the terminal to display the accented output, because here I compile things in hand without IDE and the problem also occurred.

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.