Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: unpacking mixed ascii & utf16 null termed strings

by Anonymous Monk
on Oct 05, 2011 at 00:29 UTC ( [id://929692]=note: print w/replies, xml ) Need Help??


in reply to unpacking mixed ascii & utf16 null termed strings

I would investigate Convert::Binary::C

  • Comment on Re: unpacking mixed ascii & utf16 null termed strings

Replies are listed 'Best First'.
Re^2: unpacking mixed ascii & utf16 null termed strings
by ikegami (Patriarch) on Oct 05, 2011 at 00:42 UTC

    C struct types have a fixed size (except possibly for their last field). The OP's record format is variable-width.

    At a glance, one might think this module useless, but the module goes beyond the ability to handle C structs. It provides the ability to do length-prefixed fields, and it provides the ability to use custom packing and unpacking routines on a per-field basis. The former doesn't help, but the latter (called "hooks") could maybe handle the text fields.

    Update: I tried, and I don't think it's possible using this module.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://929692]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2024-04-24 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found