views:

27

answers:

2

So I know that my server on real form submit turns %CE%EB%E5%E3+%DF%EA%F3%F8%EA%E8%ED into Олег Якушкин . How to peform string transfer from Олег Якушкин into %CE%EB%E5%E3+%DF%EA%F3%F8%EA%E8%ED using C#?

+1  A: 

Like this:

Uri.EscapeDataString(str)

Note that this will encode a space character as %20, not +. However, PHP should handle that fine.

SLaks
And BTW what is result encoding of such operation - UTF-8 (I work with russian and other such lancuages)?
Blender
[Yes, UTF8](http://msdn.microsoft.com/en-us/library/system.uri.escapedatastring.aspx)
SLaks
+1  A: 

HttpUtility.UrlEncode

Aviad P.