当我在我的skydrive中使用中文文件名时,程序崩溃了。 [英] Program crashed when I used chinese file name in my skydrive.

查看:80
本文介绍了当我在我的skydrive中使用中文文件名时,程序崩溃了。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的地铁计划上获取skydrive媒体文件(照片,音频和视频)。

I want to get skydrive media file(photo, audio and video) on my metro program.

它已经成功。我使用gridview来绑定名称和在我的程序上显示缩略图。 

It's succed. And I used gridview to bind name and to show thumbmail on my program. 

但是如果我的skydrive 文件名是"中文字"(如时代),我的程序将会崩溃。 

But if my skydrive file name is "Chinese word"(like 時代), my program will crashed. 

条件是

1.如果文件的拇指邮件为空且 它是中文名称,我的程序将正常。

1.If the file's thumbmail is null and it is Chinese name, my program will normal.

2.如果文件有thumbmail并且是英文名称,我的程序将正常。

2.If the file has thumbmail and it is English name, my program will normal.

3.如果文件有thumbmail而且是中文名,我的程序将崩溃并有例外。

3.If the file has thumbmail and it is Chinese name, my program will crash and has exception.

  Uri 字符串导致程序崩溃,它包含中文单词。

The Uri string lead to the program crash that it contains Chinese word .

示例代码(PhotoSky - SkyDrive示例)是相同的条件。

The sample code(PhotoSky - SkyDrive Sample) is the same condition.

我的异常消息是"Exception = {System.Runtime.InteropServices.COMException(0x80004005):错误HRESULT E_FAIL已经退回来自对COM组件的调用。}"

My exception message is "Exception = {System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.}"

我使用了跟随代码来绑定我的xaml上的Image。和 我uriSource 是" http://storage.live.com/s1pVn-H_pt7yvWCXjqIvg-_dFiZWzDe34Y0JItOJMVWRdkGZmbD27XergOaAmRUHQ7vR6BDV8r3Q3eZ0l-x4tVBsQCH5bf4V_lqqvg6N2zMm3CHZWty303who7NLBhW8tDu/%E8%B3%87 %E6%96%99%E5%A4%BE.jpg:缩略图/%E8%B3%87%E6%96%99%E5%A4%BE.jpg "

I used follow code to bind Image on my xaml. and my uriSource is "http://storage.live.com/s1pVn-H_pt7yvWCXjqIvg-_dFiZWzDe34Y0JItOJMVWRdkGZmbD27XergOaAmRUHQ7vR6BDV8r3Q3eZ0l-x4tVBsQCH5bf4V_lqqvg6N2zMm3CHZWty303who7NLBhW8tDu/%E8%B3%87%E6%96%99%E5%A4%BE.jpg:Thumbnail/%E8%B3%87%E6%96%99%E5%A4%BE.jpg"

        public ImageSource Image

        {

           得到
            {

                if(this._image == null&& this._imagePath!= null)

             ;    {

                    this._image = new BitmapImage(new Uri(this._imagePath,UriKind.Absolute));

                 }
                return this._image;

            }

        public ImageSource Image
        {
            get
            {
                if (this._image == null && this._imagePath != null)
                {
                    this._image = new BitmapImage(new Uri(this._imagePath,UriKind.Absolute));
                }
                return this._image;
            }

           设为

            {

                this._imagePath = null;&
                this.SetProperty(ref this._image,value);

            }
        }

            set
            {
                this._imagePath = null;
                this.SetProperty(ref this._image, value);
            }
        }

推荐答案

你能给我发一个测试申请吗?  Microsoft.com上的MSMALL
Can you send me an application to test?  MSMALL at Microsoft.com


这篇关于当我在我的skydrive中使用中文文件名时,程序崩溃了。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆