Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what does '\xB8' mean?

Status
Not open for further replies.

lcs01

Programmer
Joined
Aug 2, 2006
Messages
182
Location
US
I've seen a piece of perl code like this:

Code:
# $myfile is a ascii file
open TSCRIPTFILE, "$myfile" || die;
local $/ = "\f"; 
# ......
while (<TSCRIPTFILE>) {
  chomp;
  $_ =~ s/\xB8/\n\xB8/g;
  #......
}
close(TSCRIPTFILE);
exit;

My questions are

1) What does \xB8 mean?
2) I'd guess this has something to do with a newline break. But why should it be treated this way?
3) Could someone recommend a web site that explains the meanings of all these special characters, such as '\xB8', '\xB9', etc?
4) Lastly, is '\xB8' the same as '\xb8'?

Thank you for your help.
 
\xB8 looks like UTF8 encoded characters, but I don't know what character that is.

- Kevin, perl coder unexceptional!
 
According to this site, it's a cedilla.

That regexp inserts a newline before all cedilla characters.
 
Thank you, Kevin and ishnid. But I still don't understand why someone in my company singled this character out. Strange.

But again, thank you both.
 
\xB8 = B8 16 = 1011 01102 = 18210

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top