【发布时间】:2014-03-18 21:22:53
【问题描述】:
我试图在我的 sdl 项目中设置 UTF8 屏幕窗口标题,但我看到的只是????,但我不知道如何处理它。这是我的示例代码:
#include "SDL/SDL.h"
int main( int argc, char* args[] )
{
int screen_width = 800;
int screen_hight = 600;
int screen_bpp = 32;
SDL_Surface *screen = NULL;
SDL_Init( SDL_INIT_EVERYTHING );
screen = SDL_SetVideoMode( screen_width, screen_hight, screen_bpp, SDL_SWSURFACE );
// Set the window caption
SDL_WM_SetCaption( "تستی", NULL ); //utf8 not working
SDL_Delay(5000);
SDL_Flip(screen);
}
【问题讨论】:
标签: c++ utf-8 screen sdl caption