# How to read content of compiled terminfo files?



## rhish (Sep 9, 2014)

Is there a way to read compiled terminfo files from ncurses? Like /usr/share/terminfo/x/xterm-256color? It*'*s garbled like a binary when opened in vi. I can glean info with `strings`, but I want to see exactly what*'*s in each file. And how it*'*s formatted.

Because of a separate issue, I want to see the exact difference between xterm-256color and xterm+256color.


----------



## freethread (Sep 9, 2014)

The ncurses routines that read the terminfo db are in the man page curs_terminfo: setupterm, tparm, tgetflag, tgetnum and tgetstr should return the capabilities of the terminal you specified. I used them once and don't remember exactly if they fits your need, also I had to read that man page 5-6 times before to get it.


----------

