Redhat Enterprise Question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Red Hat support > Red Hat Topics > Redhat Enterprise Question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Redhat Enterprise Question  
Sparky


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-21-04 07:45 AM

I don't really know how to ask this because it works under AIX so here
goes.  This is not a PERL related question but about how linux
displays characters via less, more, pg or vi etc.

This PERL program prints an ascii chart, decimal, hex, octal and
(hopefully) the character representation.

#!/usr/bin/perl -w

$ascii_counter = 0;

while ( $ascii_counter < 256 ) {
printf "%3s %2x %3o %1s\n", $ascii_counter, $ascii_counter,
$ascii_counter, chr($ascii_counter);
$ascii_counter++;
}

exit;

My question is, for example, decimal 199, hex c7, octal 307 should
display a character of Ç (cedilla) but if I vi a file (under linux)
that contains this character its not what I'd expect to be displayed.
Under AIX this program works and displays as I would expect as well as
any editor or pager but under linux I see totally different things and
worse when I use the pagers like less or more.

Have I installed something wrong or missed something during
installation?

Next step is a ticket to redhat.

Thanks





[ Post a follow-up to this message ]



    Re: Redhat Enterprise Question  
Jean-David Beyer


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-21-04 12:45 PM

Sparky wrote:
> I don't really know how to ask this because it works under AIX so here
> goes.  This is not a PERL related question but about how linux displays
> characters via less, more, pg or vi etc.
>
> This PERL program prints an ascii chart, decimal, hex, octal and
> (hopefully) the character representation.
>
> #!/usr/bin/perl -w
>
> $ascii_counter = 0;
>
> while ( $ascii_counter < 256 ) { printf "%3s %2x %3o %1s\n",
> $ascii_counter, $ascii_counter, $ascii_counter, chr($ascii_counter);
> $ascii_counter++; }
>
> exit;
>
> My question is, for example, decimal 199, hex c7, octal 307 should
> display a character of Ç (cedilla) but if I vi a file (under linux)
> that contains this character its not what I'd expect to be displayed.
> Under AIX this program works and displays as I would expect as well as
> any editor or pager but under linux I see totally different things and
> worse when I use the pagers like less or more.
>
> Have I installed something wrong or missed something during
> installation?
>
> Next step is a ticket to redhat.
>
I just tried it on RHEL 3 and it displays the _printable ASCII_ characters
OK, and little grey box outlines for the rest.

--
.~.  Jean-David Beyer           Registered Linux User 85642.
/V\                             Registered Machine   241939.
/( )\ Shrewsbury, New Jersey     http://counter.li.org
^^-^^ 07:45:00 up 29 days, 10:39, 3 users, load average: 4.23, 4.29, 4.23






[ Post a follow-up to this message ]



    Re: Redhat Enterprise Question  
Markku Kolkka


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-21-04 10:45 PM

Sparky wrote:
> This PERL program prints an ascii chart, decimal, hex, octal and
> (hopefully) the character representation.
>
> #!/usr/bin/perl -w
>
> $ascii_counter = 0;
>
> while ( $ascii_counter < 256 ) {

_ASCII_ only has character codes 0-127. The handling of character codes
128 and beyond depends on the character set and encoding used by the
system.

>     printf "%3s %2x %3o %1s\n", $ascii_counter, $ascii_counter,
> $ascii_counter, chr($ascii_counter);
>     $ascii_counter++;
> }
>
> exit;
>
> My question is, for example, decimal 199, hex c7, octal 307 should
> display a character of Ç (cedilla)

Only if you are using one of the ISO Latin character sets (ISO 8859-1,
etc). I think RHEL uses UTF-8 encoded Unicode like RHL9 and Fedora do.

--
Markku Kolkka
markku.kolkka@iki.fi





[ Post a follow-up to this message ]



    Re: Redhat Enterprise Question  
Sparky


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-04 10:45 PM

On Sat, 20 Nov 2004 23:32:21 -0500, Sparky <tyates@newsguy.com> wrote:

>I don't really know how to ask this because it works under AIX so here
>goes.  This is not a PERL related question but about how linux
>displays characters via less, more, pg or vi etc.
>
>This PERL program prints an ascii chart, decimal, hex, octal and
>(hopefully) the character representation.
>
>#!/usr/bin/perl -w
>
>$ascii_counter = 0;
>
>while ( $ascii_counter < 256 ) {
>    printf "%3s %2x %3o %1s\n", $ascii_counter, $ascii_counter,
>$ascii_counter, chr($ascii_counter);
>    $ascii_counter++;
>}
>
>exit;
>
>My question is, for example, decimal 199, hex c7, octal 307 should
>display a character of Ç (cedilla) but if I vi a file (under linux)
>that contains this character its not what I'd expect to be displayed.
>Under AIX this program works and displays as I would expect as well as
>any editor or pager but under linux I see totally different things and
>worse when I use the pagers like less or more.
>
>Have I installed something wrong or missed something during
>installation?
>
>Next step is a ticket to redhat.
>
>Thanks

We found the issue.  Its because redhat choose to use utf-8 code set.
If I want to change this how would I permanently set the OS to a code
page of 819 and a code set of ISO8859-1?  Is it simply a change to
/etc/sysconfig/i18n?

Thanks






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:45 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register