- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
integer i open(1,file='test.txt') do i=1,10000 write(1,*)char(i) enddo close(1) end
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://www.cs.tut.fi/~jkorpela/chars.html
The bottom line is:
- If you don't use Unicode, you can see those characters only if all of them reside in the same code page (Greek?) and the font you're using to see them has these characters and the viewer application is set up for that code page. (Also, console code pages (SetConsoleIoCp) are pretty difficult to get right)
- If you use Unicode, you can output any combination of characters you want, but
1) Fortran support for Unicode is clumsy -- you have to use INTEGER(2) and APIs such as MultiByteToWideChar
2) The viewer applicaton must be such that it supports Unicode as well
3) The font you use must also contain these characters.
- A compromise solution could be to output the text to a HTML, where Unicode characters can be inserted in form &nnnn;. For example, α produces lowercase alpha (a ).
HTH
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought I'd point out that since the 9.0 release, Array Visualizer has supportted Unicode characters. I.e. object names, object comments, captions, andarrayscan be Unicode strings. You can look at the attachedscreen shot of Array Viewer to see what I mean.
Unfortunately, for the most part the Fortran API to AV (the AvFRT and AvObjMod modules) don't take Unicode arguments. (you can have Unicode string arrays, but not Uniocde object names, or captions). It should be easy enough to extend the API to support these arguments, but I'm wondering which approach developers would like to see:
1. Adding additional routines that take INTEGER(2) stringarguments
2. Keeping the same routines but converting UTF8 strings to Unicode internally
3. Keeping the same routines but convering HTML style entities of the form:"&#nnnn;" to unicode characters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank both of you very much!
To Jugoslay: Could you give me some example to show the usage of MultiByteToWideChar?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually the screen shot was just the Intel Array Viewer application where I've opened a data file which uses Unicode characters.
But yes, you can use AV from Fortran, VB, C, or C#. AV comes with samples in all these languages, so could look through the VB samples on the kit to get an idea of how it worksWe've also had several recent questions in the Array Visualizer forum on using AV with VB.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page