Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Converting text from Cyrillic to Western European (iso)

Posted on 2007-10-19
8
Medium Priority
?
1,496 Views
Last Modified: 2013-12-17
Hi all,
my question is how can I encode a string from textbox1 (cyrillic letters, as far as i understand - its unicode) to Western European (ISO) encoding?

what i got so far is

            string Source = textBox1.Text;
            string Target = System.Text.Encoding.Unicode.GetString(System.Text.Encoding.GetEncoding(1251).GetBytes(Source));
            textBox2.Text = Target;

but it doesnt work anyway...
0
Comment
Question by:Wisebird
  • 3
  • 3
7 Comments
 
LVL 21

Expert Comment

by:surajguptha
ID: 20110488
cyrillic letters as in cyrilic font?
0
 
LVL 2

Author Comment

by:Wisebird
ID: 20114849
yepp
0 1 2 3 etc
0
 
LVL 21

Expert Comment

by:surajguptha
ID: 20114925
I hope the text box you are using is a RichText box?? In that case just assign the text to the textbox and then set the font of the text box to Western European iso font
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 2

Author Comment

by:Wisebird
ID: 20168159
hi, thanx for the tip and sorry for long delay - been ill.
anyways, yes, i use the richtextbox, but when in the properties i set the "script" (it is said that way) to western, and rechek it right after - its back to cyrillic.
what can be wrong?
0
 
LVL 2

Author Comment

by:Wisebird
ID: 20186559
Encoding.GetEncoding("iso-8859-1").GetString(Encoding.GetEncoding("iso-8859-5").GetBytes(Source));

thats the answer ;)
0
 
LVL 21

Expert Comment

by:surajguptha
ID: 20190748
Cool. Best of luck :)
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 20432500
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month15 days, 18 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question