title: Creating a POST with url elisp package in emacs: utf-8 problem
body: <p>I'm currently creating a Rest client for making blog posts much in the spirit of pastie.el. The main objective is for me to write a textile in emacs and make a post to a Rails application that will create it. It is working fine until I type anything in either spanish or japanese, then I get a 500 error. pastie.el has this same problem also by the way. </p>
  
  <p>Here is the code:</p>
  
  <p>(require 'url)</p>
  
  <pre><code>(defun create-post()
  
  (interactive)
  
  (let ((url-request-method "POST")
  
      (url-request-extra-headers '(("Content-Type" . "application/xml")))
  
      (url-request-data (concat "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;"
                                "&lt;post&gt;"
                                "&lt;title&gt;"
                                "Not working with spanish nor japanese"
                                "&lt;/title&gt;"
                                "&lt;content&gt;"
                                ;; "日本語"   ;; not working
                                ;; "ñ"        ;; not working either
                                "h1. Textile title\n\n"
                                "*Textile bold*"
                                "&lt;/content&gt;"
                                "&lt;/post&gt;"))
      )                               ; end of let varlist
  (url-retrieve "http://127.0.0.1:3000/posts.xml"
                ;; CALLBACK
                (lambda (status)
                  (switch-to-buffer (current-buffer)))
                )))
  </code></pre>
  
  <p>The only way I can imagine right now that the problem could be fixed is by making emacs encode the utf-8 characters so that a 'ñ' becomes '&amp;#241' (which works by the way).</p>
  
  <p>What could be a work around for this problem?</p>
  
  <p>EDIT: '*' is not equivalent to &ast;'. What I meant was that if I encoded to utf-8 with emacs using for example 'sgml-char' it would make the whole post become utf-8 encoded. Like &ast;Textile bold&ast; thus making RedCloth being unable to convert it into html. Sorry, it was very bad explained.</p>