spiderwell Posted April 11, 2011 Share Posted April 11, 2011 i have made a site, intending it to be an online resource for copy and pasting lists in various formats. a list is pulled from the database and then returned as either a csv, unordered list, xml etc I am using ajax to update the textarea with the formating for the list, but i am losing, in this instance, french letters. Here is an example: its a list of months in french http://ethickink.co.uk/lists/pages/listdetail.php?id=36 when the list first displays it has the accents on letters etc all showing fine, but if you click from the options to list as say an <ul> the foreign letters get broken. if i take the link and open it in a seperate page it displays them fine (http://ethickink.co.uk/lists/pages/returngenlist.php?id=36&action=ul), but i have added a class to the links to allow ajax/jquery to operate instead. my ajax looks like this: $(function() { $('.generatorlink').click( function() { $.get( $(this).attr('href'), function(msg) { $("#listdisplay").text(msg); }); return false; // don't follow the link! }); }); #listdisplay is the text area where the ouput is placed in the main area Quote Link to comment https://forums.phpfreaks.com/topic/233347-special-characters-not-displaying-on-ajax-update/ Share on other sites More sharing options...
spiderwell Posted April 15, 2011 Author Share Posted April 15, 2011 anyone any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/233347-special-characters-not-displaying-on-ajax-update/#findComment-1201827 Share on other sites More sharing options...
spiderwell Posted May 2, 2011 Author Share Posted May 2, 2011 anyone any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/233347-special-characters-not-displaying-on-ajax-update/#findComment-1209506 Share on other sites More sharing options...
sunfighter Posted May 2, 2011 Share Posted May 2, 2011 anyone any ideas? spiderwell I really don't know what I'm talking about here, but in looking at the script the only thing that stands out as a maybe culprit is the use of the clipboard to write your lists. If you've used document.getElementById("listdisplay").innerText = returnedTEXT; and that don't do it I'm out of ideas. PS. 'returnedTEXT' is not the correct words. I would use document.getElementById("listdisplay").innerHTML = httpRequest.responseText; but your doing this in jquery and I don't know the words for that. Quote Link to comment https://forums.phpfreaks.com/topic/233347-special-characters-not-displaying-on-ajax-update/#findComment-1209570 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.