PC Review


Reply
Thread Tools Rate Thread

Convert Unicode string to EBCDIC

 
 
=?Utf-8?B?U3Jpbml2YXMgQXBwYW5h?=
Guest
Posts: n/a
 
      13th May 2005
Hi,

Could someone pls tell me how to convert a Unicode string to EBCDIC
Intenational.
Is WideCharToMultiByte API is the only way? how do we use it.
Can the Encoding class method GetEncoding(CodePage) be used to achieve the
same result.

Thanks,

- Srinivas
 
Reply With Quote
 
 
 
 
Joerg Jooss
Guest
Posts: n/a
 
      13th May 2005
Srinivas Appana wrote:

> Hi,
>
> Could someone pls tell me how to convert a Unicode string to EBCDIC
> Intenational.
> Is WideCharToMultiByte API is the only way? how do we use it.
> Can the Encoding class method GetEncoding(CodePage) be used to
> achieve the same result.


System.Text.Encoding should do the trick:

// Let's try state-of-the-art EBCDIC 1047 ;-)
Encoding enc = Encoding.GetEncoding(20924);
byte[] bytes = enc.GetBytes("500 €");

All available Win32 code pages and their identifiers are listed here:
http://tinyurl.com/cjwm

Cheers,
--
http://www.joergjooss.de
mailto:news-(E-Mail Removed)
 
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
Hi,how to Convert unicode string to MultiByte in VB.net? Billow Microsoft ASP .NET 2 1st Dec 2005 03:19 PM
Convert memoryStream to unicode string =?Utf-8?B?RWRp?= Microsoft Dot NET Framework 1 25th Jul 2005 01:42 PM
How do i convert unicode string to ansi string in C#? Julia Microsoft C# .NET 5 31st May 2005 09:44 PM
how to convert a UTF8 string to Unicode with C# =?Utf-8?B?S2VtcHRvbg==?= Microsoft Dot NET Compact Framework 2 9th Jul 2004 05:56 PM
How to convert this unicode string to a normal string? =?Utf-8?B?Tmlja3k=?= Microsoft C# .NET 2 21st Jun 2004 11:24 PM


Features
 

Advertising
 

Newsgroups
 


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