aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird's [Version 1.2.3] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird Watch "URLyBird New topic
Author

URLyBird's [Version 1.2.3]

Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
"All text values, and all fields (which are text only), contain only 8 bit characters, null terminated if less than the maximum length for the field. The character encoding is 8 bit US ASCII."

1)Can Someone please explain the above?
2)What does "null terminated" mean?
3) 8 bit char ..how?? [i.e. location is 64 byte..how can it be 8 bit]??

Thank you
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
2) maybe you should read a little bit about C strings
3) did you try google/wikipedia on US ASCII character encoding?


SCJP 1.4 100%
SCJD 99.5%
mohamed sulibi
Ranch Hand

Joined: Sep 04, 2005
Posts: 169
hi;

- 8 bit char mean the available bits to store one char is 8-bit, The character encoding is 8 bit US ASCII==> mean just the chars that is in the ASCII so there are no arabic or another language just english,
- null terminated ==> if the field have the value "mohamed" in the location so the the field in the db will be "mohamed " and the empty string is null or '\0' or the byte "00000000" is an null char. so in the above ex there are 64- len("mohamed") = 57 null bytes after mohamed.

regards.
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2268
    
    3

Even if you had searched at Google about the 8 bit US-ASCII encoding, you would still have doubts about it, as it is a 7 bit character encoding, not 8. It means that you have to read/right records from the databae using this character encoding. For instance, when I read records from the database, I create Strings with each byte array that corresponds to one field value, using this encoding (new String(byte array, "US-ASCII")). You may still use it, even though it is a 7 bit character encoding. I justified that I used it anyway, even though the specifications refer to it wrongly.

About the null terminators, I did not use them. I added extra spaces to the value of each field, so it has the maximum size of its position. For instance, a field can have 64 characters, and the value has 30, so the value that will be persisted is 30 + 34 blank spaces.

Payal, please feel free to come here and ask any question you want. Someone will indeed help you!


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
To All,

Thank you so much for your reply with good examples. It helped a lot to make it clear.

Regards,
Payal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLyBird's [Version 1.2.3]