PC Review


Reply
Thread Tools Rate Thread

convert from unicode to ascii (hebrew)

 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      28th Jun 2004
z. f. <(E-Mail Removed)> wrote:
> i need to convert a unicode string to ascii string (in order to put it in
> HTML page url )


In .NET, strings are *always* Unicode.

> right now the string gets to the page, but when the url clicked (with the
> unicode string in a query string parameter) - the page gets to its
> destination but showing =3Fפ=3Fר א=3F=3F=3F =3F=3Fת=3F ש=3F=3F" as the value
> it got from the url.
> so i need probably to convert it to ascii, but how?


You need to find out *exactly* what the problem is first. See
http://www.pobox.com/~skeet/csharp/d...ngunicode.html

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
 
 
 
z. f.
Guest
Posts: n/a
 
      28th Jun 2004
Hi,

i need to convert a unicode string to ascii string (in order to put it in
HTML page url )
right now the string gets to the page, but when the url clicked (with the
unicode string in a query string parameter) - the page gets to its
destination but showing יפור אהבה בלתי שכח" as the value
it got from the url.
so i need probably to convert it to ascii, but how?

TIA, z.



 
Reply With Quote
 
z. f.
Guest
Posts: n/a
 
      28th Jun 2004
it managed to work out by changing the content-type header of the aspx/HTML
page as following:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">



"Jon Skeet [C# MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
z. f. <(E-Mail Removed)> wrote:
> i need to convert a unicode string to ascii string (in order to put it in
> HTML page url )


In .NET, strings are *always* Unicode.

> right now the string gets to the page, but when the url clicked (with the
> unicode string in a query string parameter) - the page gets to its
> destination but showing =3Fפ=3Fר א=3F=3F=3F =3F=3Fת=3F

ש=3F=3F" as the value
> it got from the url.
> so i need probably to convert it to ascii, but how?


You need to find out *exactly* what the problem is first. See
http://www.pobox.com/~skeet/csharp/d...ngunicode.html

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unicode to ASCII in C# srks Microsoft Dot NET Compact Framework 1 23rd Apr 2010 05:51 PM
convert a prorams from ASCII to UNICODE Frank Microsoft VC .NET 8 7th Jan 2007 02:25 PM
how to convert ASCII stram to Unicode string Jay Microsoft Dot NET Compact Framework 2 11th Feb 2006 02:41 AM
[C#] Convert a string in ascii to unicode =?Utf-8?B?RnJlZGR5Ym95?= Microsoft Dot NET Compact Framework 11 23rd Dec 2005 12:40 PM
convert from unicode to ascii (hebrew) Jon Skeet [C# MVP] Microsoft ASP .NET 2 28th Jun 2004 01:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:22 AM.