PC Review


Reply
Thread Tools Rate Thread

Convert DOS Cyrillic text to Unicode

 
 
Nikolay Petrov
Guest
Posts: n/a
 
      27th Jul 2004
How can I convert DOS cyrillic text to Unicode


 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      27th Jul 2004
Nikolay Petrov <(E-Mail Removed)> wrote:
> How can I convert DOS cyrillic text to Unicode


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

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Nikolay Petrov
Guest
Posts: n/a
 
      27th Jul 2004
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]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Nikolay Petrov <(E-Mail Removed)> wrote:
> > How can I convert DOS cyrillic text to Unicode

>
> See http://www.pobox.com/~skeet/csharp/unicode.html
>
> --
> Jon Skeet - <(E-Mail Removed)>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      27th Jul 2004
Nikolay Petrov <(E-Mail Removed)> 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 - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Nikolay Petrov
Guest
Posts: n/a
 
      27th Jul 2004
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]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Nikolay Petrov <(E-Mail Removed)> 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 - <(E-Mail Removed)>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      27th Jul 2004
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 <(E-Mail Removed)> 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.
>
> --



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      27th Jul 2004
Nikolay Petrov <(E-Mail Removed)> 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 - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      27th Jul 2004
Cor Ligthert <(E-Mail Removed)> 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 - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Nikolay Petrov
Guest
Posts: n/a
 
      27th Jul 2004
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]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Nikolay Petrov <(E-Mail Removed)> 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 - <(E-Mail Removed)>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      27th Jul 2004
Nikolay Petrov <(E-Mail Removed)> 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 - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to convert unicode text to normal text =?Utf-8?B?RHIuIEEgSyBTaW5naA==?= Microsoft Access Form Coding 1 30th Jul 2006 06:19 PM
need some help with Arabic text copy/paste, convert to unicode? Rik Windows XP General 7 31st May 2006 11:57 AM
Russian Cyrillic Unicode Harry Sampson Microsoft Word New Users 3 18th Feb 2005 06:42 PM
Convert DOS Cyrillic text to Unicode Nikolay Petrov Microsoft VB .NET 10 27th Jul 2004 02:12 PM
Convert text encoded with character referense (&#123;) to unicode or uft-8 Daniel Köster Microsoft Dot NET 4 1st Jun 2004 07:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:35 PM.