not sure if someone can give me a hint how to solve/approach my problem:
I'm currently developing a very light database application for using on linux text console based on ncurses.
When working with multi line fields in forms, I run into the issue that I don't know how to handle CR / LF at the end of a line properly. The field buffer of a multi line field is simply always filled up with blanks until the line ends and the next line begins.
If I save that in mysql as field type "text" I get practically one line with a lot of blanks between each "real" line, as the field buffer cannot handle LF as it looks. As long as I write that back into an ncurses multi line field of exactly the same size it is not really a problem. But when the size is different that of course doesn't work anymore.
Any ideas or hints how to handle that with a multi line field in ncurses properly?