473,725 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert DOS Cyrillic text to Unicode

How can I convert DOS cyrillic text to Unicode
Jul 21 '05 #1
17 4358
Nikolay Petrov <jo******@mail. bg> wrote:
How can I convert DOS cyrillic text to Unicode


See http://www.pobox.com/~skeet/csharp/unicode.html

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
I have read this and other info in Unicode topic
My question is how can I do it in VB. I need the code.

"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
Nikolay Petrov <jo******@mail. bg> wrote:
How can I convert DOS cyrillic text to Unicode


See http://www.pobox.com/~skeet/csharp/unicode.html

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #3
Nikolay Petrov <jo******@mail. bg> wrote:
I have read this and other info in Unicode topic
My question is how can I do it in VB. I need the code.


I provide some C# code to read a file in one encoding and write it in
another. It's very simple code - it should be easy to understand and
rewrite in VB.NET. The important thing is really just the creation of
the StreamReader with the right encoding.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4
My problem is that I don't read file.
The DOS Cyrillic text is pasted in a textbox, and should apear in another.
That's all.
I don't have anyting in Binary.
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
Nikolay Petrov <jo******@mail. bg> wrote:
I have read this and other info in Unicode topic
My question is how can I do it in VB. I need the code.


I provide some C# code to read a file in one encoding and write it in
another. It's very simple code - it should be easy to understand and
rewrite in VB.NET. The important thing is really just the creation of
the StreamReader with the right encoding.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #5
Hi Jon,

I pointed Nikolay in the language.VB newsgroup on you and Jay B, who has
answered a message in language.VB however as well not complete enough for
Nikolay. Jay B will probably not be active on this newsgroup before 13:00
GMT.

I am curious as well, what is the right encoding you think about for this
Cyrillic problem?

Nikolas wrote in the language VB group that he past it from a notepad
so I guess UTF16?

:-)

Cor

....
Nikolay Petrov <jo******@mail. bg> wrote:
I have read this and other info in Unicode topic
My question is how can I do it in VB. I need the code.


I provide some C# code to read a file in one encoding and write it in
another. It's very simple code - it should be easy to understand and
rewrite in VB.NET. The important thing is really just the creation of
the StreamReader with the right encoding.

--

Jul 21 '05 #6
Nikolay Petrov <jo******@mail. bg> wrote:
My problem is that I don't read file.
The DOS Cyrillic text is pasted in a textbox, and should apear in another.
That's all.
I don't have anyting in Binary.


If it's in a text box, you should have it as Unicode text already. All
strings are in Unicode in .NET.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #7
Cor Ligthert <no**********@p lanet.nl> wrote:
I pointed Nikolay in the language.VB newsgroup on you and Jay B, who has
answered a message in language.VB however as well not complete enough for
Nikolay. Jay B will probably not be active on this newsgroup before 13:00
GMT.

I am curious as well, what is the right encoding you think about for this
Cyrillic problem?
Not sure - but it sounds like it won't actually be a problem, as if
he's got the data in notepad to start with, there's no encoding change
required - cut and paste should sort everything out.
Nikolas wrote in the language VB group that he past it from a notepad
so I guess UTF16?


No way - DOS precedes UTF16 by a long time!

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #8
The user pasts text from text files, which contain DOS Cyrillic characters.
When they are pasted in text box or even in the Notepad windows they look
like garbage.
I am not sure, can I post a file here as attachment, so you can see it?

"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote in message
news:MP******** *************** *@msnews.micros oft.com...
Nikolay Petrov <jo******@mail. bg> wrote:
I have read this and other info in Unicode topic
My question is how can I do it in VB. I need the code.


I provide some C# code to read a file in one encoding and write it in
another. It's very simple code - it should be easy to understand and
rewrite in VB.NET. The important thing is really just the creation of
the StreamReader with the right encoding.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #9
Nikolay Petrov <jo******@mail. bg> wrote:
The user pasts text from text files, which contain DOS Cyrillic characters.
What does he have the text open in? It sounds like the existing app is
probably not putting it into the clipboard in Unicode :(
When they are pasted in text box or even in the Notepad windows they look
like garbage.
Ah - I thought you meant he had it working in notepad to start with.
I am not sure, can I post a file here as attachment, so you can see it?


It's probably best if you email it to me.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
7739
by: Markus Ernst | last post by:
Hi I have a string such as Добро" that shows the cyrillic word "?????" in the browser. Now I played around with lots of examples and contributed functions in the manual (html_entity_decode, strtr, convert_cyr_string ...) but was not able to decode these entities. As browsers displays them correctly on my PC and Mac
35
6320
by: Philipp Lenssen | last post by:
Does anybody have experience displaying Cyrillic in common browsers with common settings? I found the following page researching the topic, however I cannot display all characters in the table (IE6, either automatic encoding detection, or forced Cyrillic encoding): <http://www.alanwood.net/unicode/cyrillic.html> For example, the first character in the table ("Cyrillic Capital Letter
10
8090
by: Nikolay Petrov | last post by:
How can I convert DOS cyrillic text to Unicode
8
3666
by: Kirill Simonov | last post by:
Hi, Could anyone suggest me a simple IDE suitable for teaching Python as a first programming language to high school students? It is necessary that it has a good support for input/output in Cyrillic. Unfortunately, most IDEs I tried failed miserably in this respect. My test was simple: I've run the code name = raw_input("What's your name? ") # written in Russian print "Hello, %s!" % name # in Russian as well
0
8888
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.