+
+(defun auth-source--decode-octal-string (string)
+ "Convert octal string to utf-8 string. E.g: 'a\134b' to 'a\b'"
+ (let ((list (string-to-list string))
+ (size (length string)))
+ (decode-coding-string
+ (apply #'unibyte-string
+ (loop for i = 0 then (+ i (if (eq (nth i list) ?\\) 4 1))
+ for var = (nth i list)
+ while (< i size)
+ if (eq var ?\\)
+ collect (string-to-number
+ (concat (cl-subseq list (+ i 1) (+ i 4))) 8)
+ else
+ collect var))
+ 'utf-8)))
+