This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Benoit, I have attached what I think is a a completely standard little C program that I'd like you to compile and run on your OpenBSD system, to determine whether the problem you have encountered is an OpenBSD bug. I've compiled and run this on three different platforms with different C compilers (including gcc 4.3.0 with -Wall and --pedantic options) and gotten the same result. Please compile this program using the same compiler and CFLAGS you are using for building netCDF. For example, it may be something like $ gcc -g bug.c -o bug Then run the resulting program and capture the output in a file, for example: $ ./bug > bug.out Run the result through the "od" program to get a hexadecimal dump of the output: $ od -x bug.out > bug.od Send me the resulting bug.od file, which is just ASCII, so you can just paste it into the email message or attach it. Thanks! --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: JLS-704865 Department: Support netCDF Priority: Normal Status: Closed
#include <stdlib.h> #include <stdio.h> #include <string.h> int main(int argc, char *argv[]) { char teststring[] = "Ä?㼿yô??ª"; int len; printf("length of teststring: %d\n", (int)strlen(teststring)); len = printf("%s", teststring); printf("\n"); return 0; }