Solution for encoding $.ajax posts without JSON?
<p>I've been doing some research to find a solution to use $.ajax with JSON that can handle character encoding issues. Looking through past posts I've seen notes about contentType and other suggestions I've incorporated.</p>

<p>Long story short, an entry like "Bobs Resume" works in vanity_name, but "Bob's Resume" doesn't.</p>

<p>Wondering if there is something else I'm missing? </p>

<pre><code>var myData = { 
    resume_id : '&lt;?php echo $this-&gt;session-&gt;userdata('resume_id'); ?&gt;',                 
    vanity_name: $('#vanity_name').val()
} 

$.ajax({
    type : 'POST',
    url : '&lt;?php echo site_url('resume/change_vanity_name'); ?&gt;',
    contentType : "application/x-www-form-urlencoded; charset=iso-8859-1",
    data: myData,
    dataType: "html",
    success : function(msg){                    
            $('#vanity_name_session').text($('#vanity_name').val());
            },
    error: function(){
               alert('failure');
        }
    }); 

}); 
</code></pre>
