A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Developer Certification (SCJD/OCMJD)
null terminated text fields?
Joined: Jan 24, 2004
Dec 21, 2004 04:25:00
I'm currently working with my assignment, and I got a problem regarding to the format of the text fields in the db file.
My assignment mandates all text fields be "null terminated if less than the maximum length for the field"(directly quoted from instructions).
But when I checked the original db file comes along with the assignment, I found that text fields are padded by spaces.
So should I pad the empty bytes with 0 or with white spaces? And do I need to consider the whitespace padding in the original records part of the fields(which is not sensible) or just rip them off?
Henry Zheng<br /> <br />I went numb when I learned to see.
Joined: Jun 08, 2004
Dec 21, 2004 04:39:00
I think the following link will help you,
URLyBird 1.3.3 data file: Reply from SUN
Padding strings with white spaces is completely accepted by sun, and it is the easiest way.
Best Regards <br /> <br />Omar F. Kalaldah<br />---------------------<br />SCJP, SCJD, SCBCD
I agree. Here's the link:
subject: null terminated text fields?
NX: URLyBird 1.1.3 Find criteria
db file: fixed length fields termination characters
Null terminated strings?
B&S - Some more questions according the database (see third post)
Null-terminated data entries.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015