Can UploadAttachments show Russian FileName not in UTF-8?

Last post 05-13-2010, 5:10 AM by Relaxander. 17 replies.
Sort Posts: Previous Next
  •  04-30-2010, 1:52 AM 60557

    Can UploadAttachments show Russian FileName not in UTF-8?

    Our web app uses Windows-1251 code page. Can we somehow convert file name for displaying and saving?
     
    Thanks,
    Alexander
  •  04-30-2010, 8:13 AM 60565 in reply to 60557

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

     

    Please use the .CopyTo or .MoveTo method and rename the uploaded files.
     
    For example:   //args.CopyTo("c:\\temp\\yourownname"); or  
                              //args.MoveTo("c:\\temp\\yourownname");

     void Uploader_FileUploaded(object sender, UploaderEventArgs args)
            {
                Uploader uploader = (Uploader)sender;
                InsertMsg("File uploaded! " + args.FileName + ", " + args.FileSize + " bytes.");
                
                //Copies the uploaded file to a new location.
                //args.CopyTo("c:\\temp\\"+args.FileName);
                //args.MoveTo("c:\\temp\\"+args.FileName);

                //You can also open the uploaded file's data stream.
                //System.IO.Stream data = args.OpenStream();
            }
     
     
    Regards,
    Eric
  •  04-30-2010, 8:41 AM 60566 in reply to 60565

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Well, it solves the problem with saving, but doesn't affect display...
    I even tried GetUploaderProvider().Rename(args.Item.FileGuid, 1251encodedname) method in the AttachmentAdded event, but it just created a file named "persisted" and the underlying item has disappeared from the attachments table.
  •  04-30-2010, 8:58 AM 60567 in reply to 60566

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Please print a screen shot and post it here, tell me how you want to change your display.
     
    Regards,
    Eric
  •  04-30-2010, 9:13 AM 60568 in reply to 60567

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Real
     
    Desired
     
  •  05-03-2010, 11:59 PM 60653 in reply to 60557

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Alexander ,
     
    In the code we fixed use UTF-8 to parse the filename.
     
    We will add option for it.
     
    Regards,
    Terry
  •  05-04-2010, 6:19 AM 60668 in reply to 60653

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Terry,
    Thanks, how soon the new version will be available?
     
    Best Regards,
    Alexander
  •  05-05-2010, 11:14 AM 60735 in reply to 60668

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Alexander ,
     
    We have fixed it , and will provide update today.
     
    By default , it will use HttpRequest.ContentEncoding , and you can change it via
     
    <add key="CuteWebUI.AjaxUploader.RequestEncoding" value="charsetname" />
     
    Regards,
    Terry
     
  •  05-05-2010, 9:24 PM 60762 in reply to 60668

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Relaxander:
    Terry,
    Thanks, how soon the new version will be available?
     
    Best Regards,
    Alexander
     
    This issue has been fixed. Please download the latest build.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-06-2010, 3:59 AM 60769 in reply to 60762

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Adam, how should I specify the code page?
    <add key="CuteWebUI.AjaxUploader.RequestEncoding" value="windows-1251" />
    <add key="CuteWebUI.AjaxUploader.RequestEncoding" value="1251" />
     
    are not working.
    Moreover, in FF there is new strange error when pressing the select file button - see screenshot below
     
    " Please click here..." link do nothing.
     
     
  •  05-06-2010, 10:03 AM 60774 in reply to 60769

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Please try this example:
     
     
    The russian file name is suported already.
     
    If you still have problems,  you add an entry in web.config.
     
    <add key="CuteWebUI.AjaxUploader.RequestEncoding" value="windows-1251" />
     
    Keep me posted

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-07-2010, 6:26 AM 60799 in reply to 60774

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Adam, the problem still exists. I did all exactly you said, but it didn't help.
    The message in the post  from 05-06-2010, 11:59 AM still appearing, but only in Firefox.
    In other browsers the picture is exactly same as in the post from 04-30-2010, 5:13 PM
  •  05-10-2010, 8:49 PM 60885 in reply to 60799

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Hi,
     
    So what issue do you get now ?
     
    The charset issue or block prompt ?
     
    Other customer also have block issue too.
     
    But we can't reproduct it yet.
     
    Can you provide an url so we can test ?
     
    Or can you test this new property ?
     
    Uploader1.UploadAddonButtonMode = UploadAddonButtonMode.Auto; (and Mask,Replace,Warning)
     
    Regards,
    Terry
     
  •  05-11-2010, 4:33 AM 60898 in reply to 60885

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Hi,
     
    Block prompt gone, but Russian file name problem still exists.
     
    <add key="CuteWebUI.AjaxUploader.RequestEncoding" value="windows-1251" /> doesn't work.
     
    <globalization requestEncoding="UTF-8" responseEncoding="UTF-8" culture="ru-ru" enableClientBasedCulture="false"/>
    saves the situation, but for some reasons we can't use it in our release just now.
     
  •  05-11-2010, 8:06 PM 60923 in reply to 60898

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Hi,
     
    How about this way ?
     
    <globalization requestEncoding="windows-1251" responseEncoding="UTF-8" culture="ru-ru" enableClientBasedCulture="false"/>
     
     
    Another thing,
     
    Can you see the correct characters when the file is UPLOADING ??
     
    For some reason, the uploader will also rename the file based on the client javascript filename.
     
     
    Regards,
    Terry
  •  05-12-2010, 2:53 AM 60930 in reply to 60923

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Hi,
     
    cutechat:
    How about this way ?
     
    <globalization requestEncoding="windows-1251" responseEncoding="UTF-8" culture="ru-ru" enableClientBasedCulture="false"/>
     
    The reverse solution works for uploader:
    <globalization requestEncoding="UTF-8" responseEncoding="windows-1251" culture="ru-ru" enableClientBasedCulture="false" />

    But it's not appropriate way for us, because  it leads to incorrect posting and the subsequent display of cyrillic characters.
     
    cutechat:
    Can you see the correct characters when the file is UPLOADING ??
     
    Yes, I can see them.
  •  05-12-2010, 8:55 PM 60966 in reply to 60930

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Hi,
     
    So what's your configuration for the <globalization />
     
    And what's the HTML meta code ?
     
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">?
     
    Regards,
    Terry
     
  •  05-13-2010, 5:10 AM 60983 in reply to 60966

    Re: Can UploadAttachments show Russian FileName not in UTF-8?

    Hi,
     
    <globalization requestEncoding="windows-1251" responseEncoding="windows-1251" culture="ru-ru" enableClientBasedCulture="false" />
     
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251" /
View as RSS news feed in XML