--- C:\download\image\exif\EXIF.py	2006-07-06 21:12:10.000000000 +0200
+++ EXIF.py	2006-07-25 14:34:15.336289800 +0200
@@ -103,6 +103,11 @@
     (8, 'SR', 'Signed Ratio')
     )
 
+def cu(x):
+    if isinstance(x, str):
+        return x
+    return ''.join(map(chr, x))
+
 # dictionary of main EXIF tag names
 # first element of tuple is tag name, optional second element is
 # another dictionary giving names to values
@@ -177,7 +182,7 @@
     0x8827: ('ISOSpeedRatings', ),
     0x8828: ('OECF', ),
     # print as string
-    0x9000: ('ExifVersion', lambda x: ''.join(map(chr, x))),
+    0x9000: ('ExifVersion', cu),
     0x9003: ('DateTimeOriginal', ),
     0x9004: ('DateTimeDigitized', ),
     0x9101: ('ComponentsConfiguration',
@@ -230,12 +235,13 @@
     0x920A: ('FocalLength', ),
     0x927C: ('MakerNote', ),
     # print as string
-    0x9286: ('UserComment', lambda x: ''.join(map(chr, x))),
+    0x9286: ('UserComment', cu),
+#    0x9286: ('UserComment', ),
     0x9290: ('SubSecTime', ),
     0x9291: ('SubSecTimeOriginal', ),
     0x9292: ('SubSecTimeDigitized', ),
     # print as string
-    0xA000: ('FlashPixVersion', lambda x: ''.join(map(chr, x))),
+    0xA000: ('FlashPixVersion', cu),
     0xA001: ('ColorSpace', ),
     0xA002: ('ExifImageWidth', ),
     0xA003: ('ExifImageLength', ),
@@ -390,18 +396,21 @@
 
 # decode Olympus SpecialMode tag in MakerNote
 def olympus_special_mode(v):
-    a={
-        0: 'Normal',
-        1: 'Unknown',
-        2: 'Fast',
-        3: 'Panorama'}
-    b={
-        0: 'Non-panoramic',
-        1: 'Left to right',
-        2: 'Right to left',
-        3: 'Bottom to top',
-        4: 'Top to bottom'}
-    return '%s - sequence %d - %s' % (a[v[0]], v[1], b[v[2]])
+    try:
+        a={
+            0: 'Normal',
+            1: 'Unknown',
+            2: 'Fast',
+            3: 'Panorama'}
+        b={
+            0: 'Non-panoramic',
+            1: 'Left to right',
+            2: 'Right to left',
+            3: 'Bottom to top',
+            4: 'Top to bottom'}
+        return '%s - sequence %d - %s' % (a[v[0]], v[1], b[v[2]])
+    except KeyError:
+        return v
         
 MAKERNOTE_OLYMPUS_TAGS={
     # ah HAH! those sneeeeeaky bastids! this is how they get past the fact
@@ -419,7 +428,7 @@
     0x0207: ('SoftwareRelease',  ),
     0x0208: ('PictureInfo',  ),
     # print as string
-    0x0209: ('CameraID', lambda x: ''.join(map(chr, x))),
+    0x0209: ('CameraID', cu),
     0x0F00: ('DataDump',  )
     }
 
@@ -478,7 +487,7 @@
     }
 
 MAKERNOTE_FUJIFILM_TAGS={
-    0x0000: ('NoteVersion', lambda x: ''.join(map(chr, x))),
+    0x0000: ('NoteVersion', cu),
     0x1000: ('Quality', ),
     0x1001: ('Sharpness',
              {1: 'Soft',
