Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: unpacking mixed ascii & utf16 null termed strings

by ikegami (Pope)
on Oct 05, 2011 at 00:42 UTC ( #929696=note: print w/replies, xml ) Need Help??

in reply to Re: unpacking mixed ascii & utf16 null termed strings
in thread unpacking mixed ascii & utf16 null termed strings

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929696]
[Discipulus]: i've adopted no solutions.. just waiting a global one, I'm not even sure he's a troll, more bugbear

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2017-11-24 11:08 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (347 votes). Check out past polls.