Re: [Dev-C++] Using Unicode in Dev-C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Thymian <Th...@gm...> - 2007-04-26 15:00:51
|
Additional to the answer of Per Westermark you could take a look to this Wikipedia article for a better / deeper understanding of the coherences of UTF along with operating systems, editors, e-mails, web, fonts, storage, converters and ... a lot more: http://en.wikipedia.org/wiki/Unicode Gruß, Werner Kitzmann Duong Ha Nguyen schrieb: > Hi Adrian, thank you for answering my question! > > I understand your answer. I tried to do as you said but I don't know > how to type Unicode characters in Dev-C++ IDE. When I typed "ư", it > displayed "?". Can you tell me how to solve it? > > I tried to convert Unicode characters to ANSI using native2ascii.exe > (as I said at my first mail) but the displayed characters were not > what I wanted. I think maybe there was some problems with the fonts. > Can you tell me how to solve it? > > Thanks in advance, > > 2007/4/25, adrian <ad...@la... <mailto:ad...@la...>>: > > Have a nice day, nha...@gm... <mailto:nha...@gm...>! > You, "Duong Ha Nguyen" <mailto:nha...@gm... > <mailto:nha...@gm...>> wrote: > > > >Hello everyone, > >I'm using Dev-C++ 4.9.9.2 <http://4.9.9.2> to write Windows > application. I would like to > >write program using Unicode encoding. I tried to use native2ascii to > >translate Unicode source code to ANSI, but it didn't display > exactly what I > >want. Can someone tell me how to write Windows programs with > Unicode in > >Dev-C++? > >Thanks in advance. > > > > > WinAPI has a two function for straight working with Unicode strings: > - MultiByteToWideChar(...) - for encoding ANSI strings in Unicode, > and > - WideCharToMultiByte(...) - for decoding Unicode to ANSI > > Also you can use TCHAR type for unvisible translating, for example: > > #include <windows.h> > #include <stdio.h> > #ifndef UNICODE > #define UNICODE > ... > TCHAR *s; > scanf ("%s", s); > printf("%s\n", s); > ... > #endif //UNICODE > > if you define UNICODE then > typedef wchar_t TCHAR, > else > typedef char TCHAR; also defined functions, working with this type > (for more see MSDN and tchar.h file) > > > Sincerely, Churin. > > P.S. Excuse me for my bad english - it's not my native language. > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |