Question

I'm using PDCurses version 3.4 for Windows; it's compiling and running properly, but I can't get it to display the IBM Extended Ascii characters from Codepage 437 (although the console is running in that codepage). I'm specifically trying to get line-drawing characters.

The following commands display the wrong characters:

mvaddch(0,20,186);
mvaddch(1,20,204);
for (unsigned i=0; i<80; i++) {
  mvaddch(1,i+20,205);
}

(This is with a 100x50-column terminal window.)

Giving mvaddch() the role-equivalent Unicode codepoints (186 = 2251, 204 = 2560, 205 = 2250) with PDC_WIDE defined also fails, displaying the same characters ('º' on line 1, 'I' repeatedly on line 2).

How do I get the line-draw characters -- and the rest of IBM Extended ASCII -- to display?

(Related article -- different symptoms, same resolution: PDcurses displaying question marks in place of intended character.)

Was it helpful?

Solution

I should have downloaded pdc34dll.zip instead of pdc34dllw.zip, despite the latter having a "w" (for "Windows"?) in the title and being advertised by SourceForge as the most recent version.

I have no idea why this worked; but it did, and PDCurses now displays IBM Extended ASCII characters properly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top