- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I print Greek characters with the print command and get Greek characters in the MS-DOS screen ?
PRINT*,"C oei? oi? I ??iae ="
PRINT*,"C oei? oi? I ??iae ="
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think it's possible unless you set your system locale to Greek (Control Panel/Regional/Locale and Set default).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the characters you want aren't in the default console codepage, you can use the Win32 API routine SetConsoleCodepage to change the codepage, but only if you're running on NT/2000/XP and if you know the code number for the codepage you want.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
Thank you for your answer. Could you please explain to me by an example this approach.
Best regards
Nikos
Thank you for your answer. Could you please explain to me by an example this approach.
Best regards
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried to follow your comments but it seems that it does not work. However, thank you for your time.
Best regards
Nikos
Best regards
Nikos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am also interested to display greek characters on the console. Here is a program (Fortran console application) which tries to load various output code pages found on the system. It was tested on a Win2000 Pro system, using CVF6.6a. It finds and loads nearly 50 code pages, but the output is displayed using the same code page of 437, which is the default on the system. Any idea, how to change the code page?
Use Kernel32 Implicit None Character*6 Text Integer*4 iCodePage Integer*4 iRet Logical*4 lRet Integer*4 hConsoleOut Integer*4 lpNumberOfCharsWritten Integer*4 lpReserved hConsoleOut = GetStdHandle( STD_OUTPUT_HANDLE ) iCodePage = 0 Text = 'abcdef' Do While (iCodePage < 100000) iCodePage = iCodePage + 1 iRet = SetConsoleOutputCP(iCodePage) If ( iRet .gt. 0 ) Then Write (6,10000) iCodePage lret = WriteConsole( hConsoleOut, loc(Text),5, loc(lpNumberOfCharsWritten),Loc(lpReserved)) Write(6,'(/)') End If End Do 10000 Format(' iCodePage=',i6) Stop End
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page