Re: filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- From: "Jack" <jack_posemsky@xxxxxxxxx>
- Date: 11 Nov 2006 09:46:32 -0800
anno4000@xxxxxxxxxxxxxxxxxxxxxx wrote:
Jack <jack_posemsky@xxxxxxxxx> wrote in comp.lang.perl.misc:
Hi
I am parsing a text file and see what looks like in the datafiel a NULL
(nothing) in between my delimeter but Perl is recognizing a value when
I print to the screen as: íµ▓½τ┤░Φâ₧
Posting "strange characters" to Usenet is useless. Every news reader
will show something else. In fact, my reader shows your string
differently in the subject and the body of the message.
To communicate the data unambiguously you could print the numeric
value of each character:
printf "%d ", ord $_ for split //, $string;
print "\n";
Be sure to post not only the output but also the proglet that
generated it.
This is screwing up my program and I want to get rid of it ! Does
anyone know how to auto match / detect this so I can remove it / deal
with it ?!!
What exactly do you mean by "this"? Simply deleting the exact sequence
of bytes wherever it appears would be a horrible solution, and probably
not a solution at all if similar but not identical strings appear
elsewhere.
You should find out why the disruptive strings are there in the first
place. Then there may be a realistic chance to get rid of them.
Anno
Ok then - does anyone know what the syntax is to detect:
1- ASCII
2- double byte characters
3- UTF-8
Thank you,
Jack
.
- Follow-Ups:
- Re: filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- From: Joe Smith
- Re: Re: filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- From: anno4000
- Re: filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- References:
- filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- From: Jack
- Re: filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- From: anno4000
- filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- Prev by Date: Re: filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- Next by Date: Re: count lines,words,punctuations and characters in perl script
- Previous by thread: Re: filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- Next by thread: Re: Re: filter out "strange" text in perl ? íµ▓½τ┤░Φâ₧
- Index(es):
Relevant Pages
|