Printing Greek characters with the print command

Printing Greek characters with the print command

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 ="

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I don't think it's possible unless you set your system locale to Greek (Control Panel/Regional/Locale and Set default).


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 - Intel Developer Support

Dear Steve,
Thank you for your answer. Could you please explain to me by an example this approach.

Best regards


I have tried to follow your comments but it seems that it does not work. However, thank you for your time.

Best regards


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))
  End If

End Do

10000 Format(' iCodePage=',i6)


Leave a Comment

Please sign in to add a comment. Not a member? Join today