Re: Binary Large Objects (BLOB) decoding
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Thu, 27 Oct 2005 13:42:40 -0700
Tom Allison wrote:
> I'm making a crude attempt to parse through some database BLOBS with
> some success. Some of the information is in XML format, some in
> "text". But a lot of crud exists because of the binary characters.
>
> I originally tried this:
>
> my $ascii = unpack("A*", $blob);
The only modification the "A*" format does is remove trailing whitespace.
> but with limited success. At least it keeps the application from
> crashing. But it would be really useful if I could so something along
> the lines of replacing certain key combinations with a simple '\n'
> or similar.
You probably need to use either the substitution or transliteration operators.
> I'm also not exactly sure what the characters are that I'm seeing.
> 'less' says that a lot of them are <C0><80> which don't appear be on
> my ascii table of characters....
That is because ASCII only refers to the characters in the range 0x00 - 0x7F.
John
--
use Perl;
program
fulfillment
.
- References:
- Binary Large Objects (BLOB) decoding
- From: Tom Allison
- Binary Large Objects (BLOB) decoding
- Prev by Date: Re: Is this script safe?
- Next by Date: Re: New Line Character(s)
- Previous by thread: Binary Large Objects (BLOB) decoding
- Next by thread: what happened to pdl.perl.org?
- Index(es):