X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fmarcdump.c;h=f92204e386431f044f06dddd8baa1c9db08d69c9;hp=02dacb18177da694e2b51034c84f8b4cc02ee15c;hb=bcf00627ba371f9e978ea5cee332d89bb5f68d76;hpb=f202b762e293b75fd3aa4683c3c92ce1ae0a7454 diff --git a/util/marcdump.c b/util/marcdump.c index 02dacb1..f92204e 100644 --- a/util/marcdump.c +++ b/util/marcdump.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ @@ -398,7 +398,10 @@ static void dump(const char *fname, const char *from, const char *to, { if ((i & 15) == 0) fprintf(cfile, " \""); - fprintf(cfile, "\\x%02X", p[i] & 255); + if (p[i] < 32 || p[i] > 126) + fprintf(cfile, "\" \"\\x%02X\" \"", p[i] & 255); + else + fputc(p[i], cfile); if (i < r - 1 && (i & 15) == 15) fprintf(cfile, "\"\n");