diff --git a/src/code/debug-int.lisp b/src/code/debug-int.lisp
index a3a3dfb5746f399905982d5820a632a492713fda..014382ee9ee0305f627a49bf50d37c4d5bf5dade 100644
--- a/src/code/debug-int.lisp
+++ b/src/code/debug-int.lisp
@@ -4943,8 +4943,10 @@ The result is a symbol or nil if the routine cannot be found."
 		 (aref (or (debug-source-start-positions d-source)
 			   (error (intl:gettext "Cannot set breakpoints for editor when ~
 				   there is no start positions map.")))
-		       local-tlf-offset)))
-	   (with-open-file (f name)
+		       local-tlf-offset))
+		(external-format (or (c::debug-source-info d-source)
+				     ext:*default-source-external-format*)))
+	   (with-open-file (f name :external-format external-format)
 	     (cond
 	      ((= (debug-source-created d-source) (file-write-date name))
 	       (file-position f char-offset))
diff --git a/src/code/debug.lisp b/src/code/debug.lisp
index 825ed0b6bdcdf286d85600cba0fad365fdb059e6..62bf9866f358cb04c1322ff4dee7d4d08da17d10 100644
--- a/src/code/debug.lisp
+++ b/src/code/debug.lisp
@@ -1486,7 +1486,8 @@ See the CMU Common Lisp User's Manual for more information.
 	(when *cached-source-stream* (close *cached-source-stream*))
 	(setq *cached-source-stream*
 	      (open name :if-does-not-exist nil
-		    :external-format (or (c::debug-source-info d-source) :default)))
+		    :external-format (or (c::debug-source-info d-source)
+					 ext:*default-source-external-format*)))
 	(unless *cached-source-stream*
 	  (error (intl:gettext "Source file no longer exists:~%  ~A.") (namestring name)))
 	(format t (intl:gettext "~%; File: ~A~%") (namestring name)))