Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Should NetCDF character attributes be null-terminated

Mark,

In my opinion, the best thing to do is to write code that is very
conservative about what it writes into a netCDF dataset and very
liberal about what it reads. In this specific case, I wouldn't write
the terminating NUL character. On reading, however, I would check for a
terminating NUL (regardless of language) and do the appropriate thing
for the language (ensure either its presence or absence).

Nothing in the netCDF library depends on a terminating NUL.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690