diff --git a/examples/eekxml/mim2remap.el b/examples/eekxml/mim2remap.el
index 39dc8411aefa69ebbf86b43d86324a9ab2e2175a..4a74a7eb3b54bd3ac6739a548db9e0c34409abcd 100644
--- a/examples/eekxml/mim2remap.el
+++ b/examples/eekxml/mim2remap.el
@@ -151,7 +151,16 @@
 			(error "No keyname for %c" (aref from 0))))
 		  (list (cons :text (if (characterp to)
 					(char-to-string to)
-				      to))
+				      (if (and (symbolp to)
+					       (string-match
+						"\\`0x\\([0-9A-Fa-f]+\\)"
+						(symbol-name to)))
+					  (char-to-string (string-to-number
+							   (match-string
+							    1
+							    (symbol-name to))
+							   16))
+					to)))
 			(cons :category 'letter)))))
 	(cdr sexp))))))