[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] OpenCOBOL and Unicode
From: |
Kevin Monceaux |
Subject: |
[open-cobol-list] OpenCOBOL and Unicode |
Date: |
Thu, 13 Oct 2011 12:04:07 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
OpenCOBOL Fans,
I don't use accented characters, etc., often but from time to time
they come in handy. Earlier today I came across this post on the OC
forums:
http://www.OpenCOBOL.org/modules/newbb/viewtopic.php?topic_id=1225&forum=1
detailing how to get OC working with ncursesw. I wish that info had
been posted to the mailing list so I would have found it earlier. I'm
terrible at keeping up with online forums. Mailing lists are so much
more convenient.
I took the suggestions in that thread a couple of steps further.
Instead of calling setlocale from COBOL programs I added a setlocale
call to libcob/screenio.c and instead of "hacking the verbose output
of a compile pass" I hacked the configure script so that -lncursesw
is used by default. I tried a simple OC program with a SCREEN SECTION
and it handled all the unicode characters I threw at it including some
polytonic Greek. The forum thread describes the code changes as
quick'n'dirty. I'm a novice at this kind of thing so my additions
might have made it even worse. But in case it helps others I've
attached a patch with my changes.
--
Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX
What's the definition of a legacy system? One that works!
Errare humanum est, ignoscere caninum.
open-cobol-1.1-ncursesw.patch
Description: Text Data
- [open-cobol-list] OpenCOBOL and Unicode,
Kevin Monceaux <=