469,923 Members | 1,777 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

Russian language encoding issue

Hello,

I am having an issue, and looking for the solution. I am trying to save Russian language content (with some english) into a html file, by entering the content thru the .net c# web application. I am trying using 'escape' to encode content in javascript and passing a string to server side thru the service. On the server side I am using URI.unescapedatastring, to enescape the content. I am getting "Invalid URI" error. I tried to use encodeURI in javascript. But no luck. Can anybody have any ideas, what might be the issue? Any help or workarround would be appriated.

Thanks in advance.
Oct 3 '08 #1
4 2983
mldisibio
190 Expert 100+
Have you tried System.Web.HtmlUtility.HtmlDecode(string) or System.Web.HttpServerUtility.HtmlDecode(string) to unescape the values on the server side?
Oct 3 '08 #2
Have you tried System.Web.HtmlUtility.HtmlDecode(string) or System.Web.HttpServerUtility.HtmlDecode(string) to unescape the values on the server side?
Thank you for the response. I tried the following,

Used 'escape(string)' in javascript, and then used

System.Web.HttpUtility.UrlDecode(dataString, System.Text.Encoding.UTF8).

And changed the Charset in html document as 'UTF-8'. Which is working good.

But I am having another issue. while I run the project & debug mode, encoding good. If I access the the URL from the browser(not running thru debug mode), then encoding doesn't work. Any clue?

Thanks
Oct 3 '08 #3
Thank you for the response. I tried the following,

Used 'escape(string)' in javascript, and then used

System.Web.HttpUtility.UrlDecode(dataString, System.Text.Encoding.UTF8).

And changed the Charset in html document as 'UTF-8'. Which is working good.

But I am having another issue. while I run the project & debug mode, encoding good. If I access the the URL from the browser(not running thru debug mode), then encoding doesn't work. Any clue?

Thanks

Never mind. I published the web site, and everything working fine.
Oct 3 '08 #4
mldisibio
190 Expert 100+
I can only make a few suggestions:
- when running directly in the browser, can you check if the browser encoding is set to utf-8? In Internet Explorer this is usually under the View menu - Encoding.
- have you uploaded your revised files correctly? If it is working in debug mode but not in the browser, perhaps the project was not correctly recompiled to the web server?
Oct 3 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Ross Noe via .NET 247 | last post: by
3 posts views Thread by Roger Withnell | last post: by
6 posts views Thread by Victor | last post: by
5 posts views Thread by Hank Moss | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.