Displaying latin-1 characters
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Displaying latin-1 characters




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

    Displaying latin-1 characters  
Tamas


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


 
01-29-04 06:35 PM

Hi,  I am parsing hex encoded latin-1 characters and on printing them
to terminal i see different results.

my $str = " ABCD%79%7A%7b%7c%7d%7e%80%81%82%83%84%85
%86%87%88%89%8a%8b%8c%8d%
 8e%8f%90%91%92%93%94%95%96%97%98%99%9a%9
b%9c%9d%9e%9f%A0%A1%a2
xyz"
$str =~ s/%([0-9a-fA-F]{2})/chr(hex($1))/eg;       #Change hex to
latin-1
print "$str\n";

The output on one Sun box (SunOS 5.8 Generic_108528-13 sun4u sparc
SUNW,Sun-Fire) on secureCRT (SecureCRT version 3.2.1 (32-bit)) i get
the following,
---
ABCDyz{|}~'""  xyz
--

and on another Sun box (5.8 Generic_108528-14 sun4u sparc
SUNW,Sun-Fire-880) on secureCRT (same version as above) i get the
following,
---
ABCDyz{|}                                   xyz
---
The characters are not displayed but they exists in the second
display.  The settings on both boxes for secureCRT match.

Any help is appreciated.
Tamas





[ Post a follow-up to this message ]



    Re: Displaying latin-1 characters  
Pascal Bourguignon


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


 
01-29-04 08:34 PM

tamashee@yahoo.com (Tamas) writes:
quote:
> Hi, I am parsing hex encoded latin-1 characters and on printing them > to terminal i see different results. > > my $str = " ABCD%79%7A%7b%7c%7d%7e%80%81%82%83%84%85 %86%87%88%89%8a%8b%8c%8 d%8e%8f%90%91%92%93%94%95%96%97%98%99%9a %9b%9c%9d%9e%9f%A0%A1%a2 > xyz" > $str =~ s/%([0-9a-fA-F]{2})/chr(hex($1))/eg; #Change hex to > latin-1 > print "$str\n"; > > The output on one Sun box (SunOS 5.8 Generic_108528-13 sun4u sparc > SUNW,Sun-Fire) on secureCRT (SecureCRT version 3.2.1 (32-bit)) i get > the following, > --- > ABCDyz{|}~
    Sponsored Links  




 





   All times are GMT. The time now is 02:21 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