Click here to Skip to main content
15,919,331 members
Home / Discussions / C#
   

C#

 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Guffa26-May-06 22:16
Guffa26-May-06 22:16 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Abu Shanab26-May-06 22:53
Abu Shanab26-May-06 22:53 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Guffa27-May-06 8:34
Guffa27-May-06 8:34 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Abu Shanab27-May-06 19:26
Abu Shanab27-May-06 19:26 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Guffa27-May-06 22:46
Guffa27-May-06 22:46 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Abu Shanab27-May-06 23:29
Abu Shanab27-May-06 23:29 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Guffa28-May-06 11:10
Guffa28-May-06 11:10 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Abu Shanab28-May-06 19:48
Abu Shanab28-May-06 19:48 
public string Display(string Str)
{
string UnicodeStr;

Encoding encGet3270Bytes;
Encoding UnicodeEnc = Encoding.Unicode;
Encoding ANSIArabic = Encoding.GetEncoding(1256);
Encoding Latin1 = Encoding.GetEncoding(1252);
Encoding OEMArabic = Encoding.GetEncoding(864);


#if CODEPAGE_1256
encGet3270Bytes = ANSIArabic;
#elif CODEPAGE_1252
encGet3270Bytes = Latin1;
#endif


byte[] cp864bytes = encGet3270Bytes.GetBytes(Str);

byte[] UnicodeBytes = Encoding.Convert(OEMArabic, UnicodeEnc, cp864bytes);

char[] UnicodeChars = new char[UnicodeEnc.GetCharCount(UnicodeBytes, 0, UnicodeBytes.Length)];

UnicodeEnc.GetChars(UnicodeBytes, 0, UnicodeBytes.Length, UnicodeChars, 0);

UnicodeStr = new string(UnicodeChars);

return UnicodeStr;

}
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Guffa29-May-06 5:05
Guffa29-May-06 5:05 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Abu Shanab29-May-06 19:26
Abu Shanab29-May-06 19:26 
AnswerRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Guffa29-May-06 22:53
Guffa29-May-06 22:53 
GeneralRe: Encode 1252 or 1256 codepage to 864 ?!!! Pin
Abu Shanab29-May-06 23:21
Abu Shanab29-May-06 23:21 
QuestionHow to get information from .csproj file using xmlserialization Pin
samtam26-May-06 19:40
samtam26-May-06 19:40 
AnswerRe: How to get information from .csproj file using xmlserialization Pin
shaz jazz26-May-06 22:34
shaz jazz26-May-06 22:34 
AnswerRe: How to get information from .csproj file using xmlserialization Pin
Yuvi Panda27-May-06 3:16
Yuvi Panda27-May-06 3:16 
QuestionHow I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani26-May-06 19:29
Nafiseh Salmani26-May-06 19:29 
AnswerRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Farrukh_526-May-06 19:59
Farrukh_526-May-06 19:59 
GeneralRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani26-May-06 20:07
Nafiseh Salmani26-May-06 20:07 
GeneralRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Farrukh_526-May-06 20:26
Farrukh_526-May-06 20:26 
QuestionRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani26-May-06 20:34
Nafiseh Salmani26-May-06 20:34 
AnswerRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Farrukh_526-May-06 20:55
Farrukh_526-May-06 20:55 
QuestionRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani26-May-06 21:17
Nafiseh Salmani26-May-06 21:17 
AnswerRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
emran83426-May-06 21:52
emran83426-May-06 21:52 
GeneralRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Nafiseh Salmani26-May-06 22:08
Nafiseh Salmani26-May-06 22:08 
GeneralRe: How I can open HTML page with html source code in Winapplication,without Create a file? Pin
Farrukh_527-May-06 0:21
Farrukh_527-May-06 0:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.