none
Unicode character not support in UriMapper?

    Question

  • I would use the following code

        <sdk:Frame 
           x:Name="ContentFrame" 
           Source="/صفحه-اول">
                <sdk:Frame.UriMapper >
                    <sdk:UriMapper>
                   <sdk:UriMapping 
                    Uri="/صفحه-اول" 
                    MappedUri="/pages/Page1.xaml"/>
                        <sdk:UriMapping 
                    Uri="/صفحه-دوم" 
                    MappedUri="/pages/Page2.xaml"/>
                    </sdk:UriMapper>
                </sdk:Frame.UriMapper>
            </sdk:Frame>

    Below is the link?

    bad display:

    http://localhost:19908/SilverlightApplication12TestPage.aspx#/%D8%B5%D9%81%D8%AD%D9%87-%D8%A7%D9%88%D9%84

    The result should be as follows:

    this is correct url:

    http://localhost:19908/SilverlightApplication12TestPage.aspx#/صفحه-اول

    Thursday, March 23, 2017 7:48 PM

All replies


  • Hi friend,

    As far as I know, the characters in the URL can only be ASCII characters, but the ASCII characters are relatively small, and the URL often contains characters other than the ASCII character set, such as non-English characters, Chinese characters, special symbols, etc., so the URL is converted. This process is called URL encoding, or URL escaping, in essence, will contain non-ASCII characters to convert the URL to a valid ASCII character format.

    So, your url includes special characters, you will get the "bad display".

    HttpServerUtility.UrlEncode Method (String):
    https://msdn.microsoft.com/en-us/library/zttxte6w%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    If you want to know about URL encoding, you can visit the ASP.NET forum for getting suitable help.

    Best Regards,

    Yohann Lu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 28, 2017 5:20 AM