• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX (Contractors): Encoding instructions unclear?

 
David Lindquist
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,
When describing the data format, the instructions state:
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.

US ASCII is a 7-bit encoding. Should I be using ISO 8859 instead?
Also, when I do a hexdump of the db file I get the following:

It shows that fields are space terminated (0x20) and not null terminated (0x00). I assume that the instructions are using "null terminated" loosely, but I just want to make sure I am not overlooking something critical. How did you all interpret this?
 
David Lindquist
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whoops, sorry folks. I should have done a search on this topic before I posted. I just found a plethora of previous posts discussing this.
 
Vlad Rabkin
Ranch Hand
Posts: 555
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There is a standard encoding "US-ASCII", which is supported by standard jdk.
It shows that fields are space terminated (0x20) and not null terminated (0x00). I assume that the instructions are using "null terminated" loosely, but I just want to make sure I am not overlooking something critical. How did you all interpret this?

Take a look at the thread in the past.
There several solutions:
Some people have just ignored issue with null-terminated string, some did it, since it is still valid operation to save a record containing space charachters (e.g. client sends update request isntead of "abc" , "abc ".
I save records filled with blanks on the rest, but if built in a parser for read in case an other programm writes null-terminated string in the data file.
Vlad
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic