• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird data file - null terminated

 
Mike Ngo
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the spec:

"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."

But when I check the original file, the strings are not really null terminated but padded with spaces.



So when I write the updated values, should I null terminated them like the spec says or pad them with spaces up to the max. field length?
 
Sam Codean
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i too have the same issue. Any Rancher can help??
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The null is the "pad" character, if your field value length is smaller then the specified one you must append it with a special character, I call it pad character.

Regards M
 
Petr Hejl
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not true. The null is terminating (not padding) - written in assignment. In addition the records are padded with spaces, not nulls. This theme was discussed many times. Search for it...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic