Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

262
Visualizações
How to print Malayalam as c/c++ program output?

I am trying to print Malayalam (a south Indian Language) as c/c++ program output but it shows some unfamiliar characters both in terminal and in user interface using WINAPI.

(The file "malayalam.txt" contain some Malayalam words.)

#include <stdio.h>
#include <windows.h>

main() {
    char s[100];
    FILE *fp;
    fp = fopen("malayalam.txt", "r");   
    if (fp == NULL) {
        puts("Cannot open file");
    }
    while (fgets(s, 100, fp) != NULL) {
        printf("%s", s);
        MessageBox(NULL, s, "Malayalam", MB_OK);
    }
    fclose(fp);
}
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The example from the following link may help you fix this issue for WINAPI.

You need to find the unicode equivalent of your Malayalam word in the .txt file you can convert it from here http://www.aksharangal.com

An example from the following page http://harikrishnanvs.blogspot.in/2011/12/printing-malayalam-as-c-program-output.html

WIN32 program to print my name in Malayalam -MessageBox

This works for windows 7, but not working in XP Create new project in visual studio 2010. File-->New-->Project-->Win32 Project Name the project click OK Finish

include header files stdafx.h, tchar.h.

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, PSTR szCommandline,int iCmdshow)
{
    TCHAR c[4];
    c[0]=3385;
    c[1]=3376;
    c[2]=3391;
    c[3]='\0';
    TCHAR szbuffer[100];

    _stprintf(szbuffer,_T("%ls"),c);
    MessageBox(NULL,szbuffer,TEXT("HELLO ALL"),0);
    return 0;
}

Please ensure that , Configuration Properties--->Character set---> Use Unicode Character Set option is selected.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda