in my application i upload files using uploadify. everythings works perfect with standart unicode a-z 0-9.
here is a sample.
<script type="text/javascript" charset="utf-8">
$(window).load(
function () {
$('#fileuploaderImage').fileUpload({
uploader: '/Scripts/uploader.swf',
script: '@Url.Action("Test", "Test")',
scriptData: { ProjectName: @Model.ProjectName },
cancelImg: '/Images/cancel.png',
auto: true,
multi: false,
folder: '/uploads',
fileDesc: 'Image',
sizeLimit: '200000000',
fileExt: '*.png;',
'onComplete': function (event, ID, fileObj, response, data) {
$("#img-path").val(response);
}
});
}
);
</script>
So u see that i pass ProjectName property to my controller by using ScriptData, it will work. but if ProjectName is like "MMMÅØÆÅÅØÆ" property in controller will only return "MMM" and rest of the string disapear. Anyone had same problem?
I think this is encoding issue.
Use like this:
scriptData: { ProjectName: encodeURIComponent('@Model.ProjectName') },
This should fix you issue.