summaryrefslogtreecommitdiff
path: root/plugins/AdvaImg/src/LibJPEG/rdjpgcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AdvaImg/src/LibJPEG/rdjpgcom.c')
-rw-r--r--plugins/AdvaImg/src/LibJPEG/rdjpgcom.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/AdvaImg/src/LibJPEG/rdjpgcom.c b/plugins/AdvaImg/src/LibJPEG/rdjpgcom.c
index 3d72e38142..ab09b443ff 100644
--- a/plugins/AdvaImg/src/LibJPEG/rdjpgcom.c
+++ b/plugins/AdvaImg/src/LibJPEG/rdjpgcom.c
@@ -228,6 +228,11 @@ process_COM (int raw)
int ch;
int lastch = 0;
+ /* Bill Allombert: set locale properly for isprint */
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_CTYPE, "");
+#endif
+
/* Get the marker parameter length count */
length = read_2_bytes();
/* Length includes itself, so must be at least 2 */
@@ -260,6 +265,11 @@ process_COM (int raw)
length--;
}
printf("\n");
+
+ /* Bill Allombert: revert to C locale */
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_CTYPE, "C");
+#endif
}