im trying to replace normal text with ascii text in this program:
so a will be replaced by â & ETC.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TextConverter
{
public partial class TextCoverter : Form
{
public TextCoverter()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string[] normal = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
string[] ascii = { "â", "ß", "ç", "ð", "è", "ƒ", "ģ", "н", "ι", "j", "ќ", "ļ", "м", "и", "ю", "ρ", "Ω", "ѓ", "$", "τ", "ט", "Λ", "ш", "χ", "У", "ź" };
for (int i = 0; i < 26; i++)
{
textBox2.Text = textBox1.Text.Replace(normal[i], ascii[i]);
}
}
}
}
But it doesn't replace with Ascii. Please help.
textbox2will only havezs replaced.