Special Character Conversion Problems – ISO-8859-1 to Unicode
public static string iso8859ToUnicode(string textToConvert) { Encoding iso8859 =
Encoding.GetEncoding("iso-8859-1"); Encoding unicode = Encoding.Unicode; byte[] srcTextBytes = iso8859.GetBytes(textToConvert); byte[] destTextBytes = Encoding.Convert(iso8859,unicode, srcTextBytes); char[] destChars = new char[unicode.GetCharCount(destTextBytes, 0, destTextBytes.Length)]; unicode.GetChars(destTextBytes, 0, destTextBytes.Length, destChars, 0); StringBuilder result = new StringBuilder(textToConvert.Length + (int)(textToConvert.Length * 0.1)); foreach (char c in destChars) { int value = Convert.ToInt32(c); if (value > 127) result.AppendFormat("{0};", value); else result.Append(c); } return result.ToString(); }
Special Character Conversion Problems ISO-8859-1 to Unicode
By: Chris Bishop
ICD-10: The Code That Cried Wolf Human Life Can Be Saved By The Universal Code Of Conduct Common HTTP Response Codes seen in Load Testing The Da Vinci Code, Achievement of Creative Economy, A Wrist Watch a Sold $20000 The Guru Code by David Saba The Guru Code - Success Stories - Does it Work? Barcodes - What Are They And Why Do We Need Them Crack Frontierville Cheat Codes and Become the Ultimate Landlord Leucoderma Remedies Which Really Works Better Alco Sense Savings Wtih Alco Sense Coupons And Alco Sense Coupon Codes Cpt Assistant: Which Code For Autism Screenings? What Hcpcs Code For Ava Cream Use Tesco Voucher Codes To Suffice Your Needs
www.yloan.com
guest:
register
|
login
|
search
IP(3.17.156.160) /
Processed in 0.007400 second(s), 7 queries
,
Gzip enabled
, discuz 5.5 through PHP 8.3.9 ,
debug code: 4 , 820, 403,