[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ESC[4m does not produce underline OOPS



On 02/03/13 13:34, Hugo Vanwoerkom wrote:
> Richard Hector wrote:
>> On 02/03/13 08:46, Thomas D. Dean wrote:
>>> On 03/01/13 11:35, Thomas D. Dean wrote:
>>>> The ANSI standard lists ESC[4m as the code to produce an underline
>>>>
>>>>  > export TERM=ansi80x25
>>>>  > printf "\033[4masdfasdfasdf"
>>>>
>>>> produces green text, not underline text as stated in the standard.
>>>>
>>>> If I put the same in c code, it works
>>>>
>>>> #include <stdio.h>
>>>> int main() {
>>>> fputs("\033[4masdfasdf",stdout);
>>>> return 0;
>>>> }
>>>>
>>>> I get underlined text.
>>>>
>>> I ran the C example in an xterm on Ubuntu!
>>>
>>> The question remains.
>>>
>>> Why does this produce color rather than underlined text?
>>>
>>> The standard says ESC[32m should produce green text and ESC[4m should
>>> produce underlined text.
>>
>> Are you doing this on a (colour) linux console, rather than an xterm?
>> Apparently it can't do underline, and simulates it with a different
>> colour instead. See 'man console_codes', or here:
>> https://www.kernel.org/doc/man-pages/online/page/man4/console_codes.4.html
>>
> 
> 404 File not found.


Sorry - fail with copy/paste and attempting to fix annoying line wraps -
which only appear in my mailer.
https://www.kernel.org/doc/man-pages/online/pages/man4/console_codes.4.html

ie s/page/pages/

Richard


Reply to: