Could you post the code you have tried?If we could reproduce your problem , it will be easier to help you solve your problem.
Best regards,
Ackerly Xu
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
Dim varRawUrl As String = HttpContext.Current.Request.RawUrl
If varRawUrl.StartsWith("/About") Then
Context.RewritePath("About.aspx")
ElseIf varRawUrl.StartsWith("/News/Kurdistan") Then
Context.RewritePath("/Hewalekan.aspx?cor=1&Title=کوردستان")
ElseIf varRawUrl.StartsWith("/News/MiddleEast") Then
Context.RewritePath("/Hewalekan.aspx?cor=2&Title=ڕۆژهەڵاتی ناوەڕاست")
ElseIf varRawUrl.StartsWith("/News/World") Then
Context.RewritePath("/Hewalekan.aspx?cor=3&Title=جیهان")
End If
End Sub
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
Dim varRawUrl As String = HttpContext.Current.Request.RawUrl
If varRawUrl.StartsWith("/About") Then
Context.RewritePath("About.aspx")
ElseIf varRawUrl.StartsWith("/News/Kurdistan") Then
Dim text = "کوردستان"
text = Server.UrlEncode(text)
Context.RewritePath("/Hewalekan.aspx?cor=1&Title=" + text)
ElseIf varRawUrl.StartsWith("/News/MiddleEast") Then
Dim text = "ڕۆژهەڵاتی ناوەڕاست"
text = Server.UrlEncode(text)
Context.RewritePath("/Hewalekan.aspx?cor=2&Title=" + text )
ElseIf varRawUrl.StartsWith("/News/World") Then
Dim text = "جیهان"
text = Server.UrlEncode(text)
Context.RewritePath("/Hewalekan.aspx?cor=3&Title="+ text)
End If
End Sub
Member
3 Points
23 Posts
global asax unicode problem
Oct 17, 2018 09:15 AM|bryar|LINK
hello,
i have a querystring and it holds a unicode string but it gives me this output (Ú©ÙØ±Ø¯Ø³ØªØ§Ù)
from this url ( Context.RewritePath("/Hewalekan.aspx?type=1&Title=کوردستان"))
regards.
Star
8119 Points
2778 Posts
Re: global asax unicode problem
Oct 17, 2018 10:10 AM|vahid bakkhi|LINK
hi
please try
OR
putting the following line in my web.config file:
And this in the head section of my HTML page:
Please MARK AS ANSWER if suggestion helps.
Member
3 Points
23 Posts
Re: global asax unicode problem
Oct 18, 2018 01:30 PM|bryar|LINK
Hi vahid bakkhi
iam test but same error
Contributor
3500 Points
1300 Posts
Re: global asax unicode problem
Oct 19, 2018 06:57 AM|Ackerly Xu|LINK
Hi bryar,
Could you post the code you have tried?If we could reproduce your problem , it will be easier to help you solve your problem.
Best regards,
Ackerly Xu
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
3 Points
23 Posts
Re: global asax unicode problem
Oct 21, 2018 06:59 AM|bryar|LINK
Code Global.asax
Star
8119 Points
2778 Posts
Re: global asax unicode problem
Oct 21, 2018 07:13 AM|vahid bakkhi|LINK
please try below
Please MARK AS ANSWER if suggestion helps.
Member
3 Points
23 Posts
Re: global asax unicode problem
Oct 21, 2018 09:42 AM|bryar|LINK
Thanks vahid bakkhi
Done