 
 (defun ycmd--get-request-hmac (method path body)
   "Generate HMAC for request from METHOD, PATH and BODY."
-  (let* ((hmac-secret (encode-coding-string
-                       ycmd--hmac-secret 'utf-8 t))
-         (joined-hmac-input
-          (mapconcat
-           (lambda (val) (ycmd--hmac-function
-                          (encode-coding-string val 'utf-8 t)
-                          hmac-secret))
-           `(,method ,path ,(or body "")) "")))
-    (ycmd--hmac-function joined-hmac-input hmac-secret)))
+  (ycmd--hmac-function
+   (mapconcat (lambda (val)
+                (ycmd--hmac-function
+                 (ycmd--encode-string val) ycmd--hmac-secret))
+              `(,method ,path ,(or body "")) "")
+   ycmd--hmac-secret))
 
 (defun* ycmd--request (location
                        content

  (- (position-bytes (point))
     (position-bytes (line-beginning-position))))

(defun ycmd--standard-content (&optional buffer)
  "Generate the 'standard' content for ycmd posts.


  (with-current-buffer (or buffer (current-buffer))
    (let* ((column-num (+ 1 (ycmd--column-in-bytes)))
           (line-num (line-number-at-pos (point)))
           (full-path (ycmd--encode-string (or (buffer-file-name) "")))
           (file-contents (ycmd--encode-string
                           (buffer-substring-no-properties
                            (point-min) (point-max))))
           (file-types (or (ycmd-major-mode-to-file-types major-mode)
                           '("generic"))))
      `(("file_data" .
