okbob / pspg

Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.
BSD 2-Clause "Simplified" License
2.43k stars 85 forks source link

Feature Request: Customize the word wrap character #232

Closed alchemistmatt closed 11 months ago

alchemistmatt commented 11 months ago

When using Putty and running psql , both Courier New and Consolas are unable to render the ↵ character correctly when it is shown for wrapped lines. Courier New shows an empty box and Consolas shows a question mark in a box. I see a reference to the ↵ character in the source code that detects continuation marks: https://github.com/okbob/pspg/blob/c3ab4f57f267b5cabcb05efbd486046514a1f670/src/infra.c#L405

Is this something that could be customized using \pset to allow us to choose a different character than ?

See the attached image for example output (in the "Access privileges" column) PostgresPager3_Wrapped_Lines

okbob commented 11 months ago

This check is used only in export routine. Another check can slowdown printing. Maybe better to fix this issue in putty. There is not any reason why putty should not to display correct utf8 char.

okbob commented 11 months ago

I tested it on my notebook with Windows 10 and fresh putty 0.79, and there is not any problem with new line chars. Tested with consolas font too. It is maybe local problem on your comp.

alchemistmatt commented 11 months ago

Thank you for the prompt response and test results. I was using Putty 0.74. I updated to Putty 0.79, 64-bit, Windows, and am still seeing the same behavior (box with a question mark instead of ↵) The character appears correctly in my Chrome browser, also using Consolas, so it is definitely quite odd that it doesn't render correctly in Putty. Not sure if it matters, but I'm running Windows 10 Enterprise (on a company managed computer). Since you cannot reproduce this issue, I will close the issue.

alchemistmatt commented 11 months ago

Another data point: ssh from within Powershell also shows a question mark in a square box. And ... testing from a Windows 2019 Server instance on the domain also shows a question mark in a square box. Perhaps a company-managed font is causing issues.