[jQuery] jCarousel doesn't parse UTF-8 charachters

[jQuery] jCarousel doesn't parse UTF-8 charachters


Hi,
I've added some text to images in the jCarousel, but the javascript
doesn't parse and convert the UTF-8 characters in the text. It breaks
the text, or replaces it with ??? characters.
Can someone help please with how to modifiy the javascript code to
make it parse and convert the UTF-8 characters correctly. Thanks in
advance.
The javascript code is:
------------------------------------------------------------------------------------------------
function videos_itemLoadCallback(carousel, state)
{
// Since we get all URLs in one file, we simply add all items
// at once and set the size accordingly.
if (state != 'init')
return;
jQuery.get('videos', function(data) {
videos_itemAddCallback(carousel, carousel.first,
carousel.last, data);
});
};
function videos_itemAddCallback(carousel, first, last, data)
{
// Simply add all items at once and set the size accordingly.
var items = data.split('[]');
for (i = 0; i < items.length; i++) {
carousel.add(i+1, videos_getItemHTML(items[i]));
}
carousel.size(items.length);
};
function videos_getItemHTML(video_item)
{
return video_item;
};
jQuery(document).ready(function() {
jQuery('#videos').jcarousel({
scroll: 4,
itemLoadCallback: videos_itemLoadCallback
});
});
------------------------------------------------------------------------------------------------