|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Russian text outputI use vb code to show information from SQL Server on the screen. I have
Russian text in this data. Everything is fine, but when I save this information into file using code streamwriter1.write(...) But when I look into file I see text which is different from text that I wrote. How I can fix this problem? Thank you, Aleks. Hi
Just use english instead. Hope this helps The Grand master Aleks Kleyn wrote: Show quoteHide quote > I use vb code to show information from SQL Server on the screen. I have > Russian text in this data. Everything is fine, but when I save this > information into file using code > streamwriter1.write(...) > But when I look into file I see text which is different from text that I > wrote. How I can fix this problem? > Thank you, Aleks. This is not helpful.
Robin S. -------------------------- Show quoteHide quote "Master Programmer" <master_program***@outgun.com> wrote in message news:1164182994.472861.300430@j44g2000cwa.googlegroups.com... > Hi > > Just use english instead. > > Hope this helps > The Grand master > > > Aleks Kleyn wrote: >> I use vb code to show information from SQL Server on the screen. I have >> Russian text in this data. Everything is fine, but when I save this >> information into file using code >> streamwriter1.write(...) >> But when I look into file I see text which is different from text that I >> wrote. How I can fix this problem? >> Thank you, Aleks. > I agree with this answer. I like when somebody decides which language and
for which purpose I should use. However I found answer StreamWriter1 = New System.IO.StreamWriter("math.HO-0609472.tex", False, System.Text.ASCIIEncoding.UTF8, 1000) Because I selected to use Russian for code greater 128 this code works as I expected. Aleks Show quoteHide quote "RobinS" <RobinS@NoSpam.yah.none> wrote in message news:p46dnRvG6ZDXFPnYnZ2dnUVZ_oydnZ2d@comcast.com... > This is not helpful. > Robin S. > -------------------------- > "Master Programmer" <master_program***@outgun.com> wrote in message > news:1164182994.472861.300430@j44g2000cwa.googlegroups.com... >> Hi >> >> Just use english instead. >> >> Hope this helps >> The Grand master >> >> >> Aleks Kleyn wrote: >>> I use vb code to show information from SQL Server on the screen. I have >>> Russian text in this data. Everything is fine, but when I save this >>> information into file using code >>> streamwriter1.write(...) >>> But when I look into file I see text which is different from text that I >>> wrote. How I can fix this problem? >>> Thank you, Aleks. >> > > However it is not everything is good in this code. I use pdftex program to
convert tex file (here I create tex file using vb.net application) into pdf file. However pdftex sees additional symbols in the start of each row. Now the question is that I need to get rid of these symbols. Aleks On another post, Aleks Kleyn wrote:
> StreamWriter1 = New System.IO.StreamWriter("math.HO-0609472.tex", But then...> False, System.Text.ASCIIEncoding.UTF8, 1000) > Because I selected to use Russian for code greater 128 this code works as I > expected. > However it is not everything is good in this code. I use pdftex program to Are you sure pdftex can handle UTF8? UTF8 will encode specific chars> convert tex file (here I create tex file using vb.net application) into pdf > file. However pdftex sees additional symbols in the start of each row. Now > the question is that I need to get rid of these symbols. into two, three or four bytes. Specifically, it seems that the chars from the range U+0080 to U+00FF (Ansi chars from 128 to 255) will be encoded into two bytes. This may confuse some programs. Because you mention "code greater [than] 128", I suppose you're actually dealing with Ansi chars. If that's the case maybe using the cyrillic Ansi charset will solve the problem: StreamWriter1 = New System.IO.StreamWriter( _ "math.HO-0609472.tex", False, _ System.Text.Encoding.GetEncoding(1251), _ 1000) HTH. Regards, Branco. Yes, it works. By the way, I use cp1251 encoding for Babel package. But it
was not clear how to match it from VB code. I also put attention that old fashioned operator fileopen, printline also works. Thank you, Aleks Kleyn I am assuming the text is unicode...
You need to make sure you are using a unicode font to view the text. If you are opening the file to view it with notepad, make sure you have a font like Arial Unicode selected. Aleks Kleyn wrote: Show quoteHide quote > I use vb code to show information from SQL Server on the screen. I have > Russian text in this data. Everything is fine, but when I save this > information into file using code > streamwriter1.write(...) > But when I look into file I see text which is different from text that I > wrote. How I can fix this problem? > Thank you, Aleks. I am assuming the text is unicode...
You need to make sure you are using a unicode font to view the text. If you are opening the file to view it with notepad, make sure you have a font like Arial Unicode selected. Aleks Kleyn wrote: Show quoteHide quote > I use vb code to show information from SQL Server on the screen. I have > Russian text in this data. Everything is fine, but when I save this > information into file using code > streamwriter1.write(...) > But when I look into file I see text which is different from text that I > wrote. How I can fix this problem? > Thank you, Aleks.
How to get a form's property value from a class?
How to identiy numerics in a string? another vb .net xml question PDF Creation components "Four" to 4 How to deploye SQL 2005 Express with my application Call or Not Call Install errors during a Fix install adding listbox selected items Debugging a COM Interop Class Library |
|||||||||||||||||||||||