473,378 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Russian text output

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.

Nov 22 '06 #1
8 2710
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.
Nov 22 '06 #2

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:
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.
Nov 22 '06 #3

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:
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.
Nov 22 '06 #4
This is not helpful.
Robin S.
--------------------------
"Master Programmer" <ma***************@outgun.comwrote in message
news:11**********************@j44g2000cwa.googlegr oups.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.

Nov 22 '06 #5
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
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:p4******************************@comcast.com. ..
This is not helpful.
Robin S.
--------------------------
"Master Programmer" <ma***************@outgun.comwrote in message
news:11**********************@j44g2000cwa.googlegr oups.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.

Nov 23 '06 #6
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

Nov 23 '06 #7
On another post, Aleks Kleyn wrote:
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.
But then...
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.
Are you sure pdftex can handle UTF8? UTF8 will encode specific chars
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.

Nov 23 '06 #8
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

Nov 23 '06 #9

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

Similar topics

0
by: M. Posseth | last post by:
hello ,, does someone know how i can acomplish the folowing task ,, i have a program with a HTML interface and i need to write Russian chars to the generated HTML files my database is...
5
by: Steven | last post by:
Hi all, I would like to create a site which shows text in English or in Russian (depending on the user's choice). Problem is that I can't save the pages in Unicode (Unicode can contain Russian...
1
by: qushui_chen | last post by:
Dear friend,Now ,i am writing a Smtp Client. but there have problem bother me that it is send Russian Language Html ,Mail is found identify code like "??" in mailBody. Mail source content,that...
2
by: Ross Noe via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Ross Noe I created an XML file using ASP that has Russian characters. Forsome reason ASP.Net doesn't read the Russian...
3
by: Roger Withnell | last post by:
I am using ASP, VBScript and MSSQL Server. I do not understand the purpose of the VBS Codepage setting - <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> nor the meta tag - <meta...
6
by: Victor | last post by:
Hi everybody, could anybody help me with the following problem : I need to set a cookie containing a Russian character string as the value, using the construct "document.cookie = ...". The...
9
by: Roger Withnell | last post by:
I've built a site in English and an now translating it into Russian. My html charset= utf-8 and my vbscript codepage is 65001. I'm using DreamWeaver. If there is a Javascript function in a...
5
by: Hank Moss | last post by:
I've been able to get the <qelement and the CSS quotes property to work well together in English, but not in Russian or mixed Russian and English. I probably don't have a firm enough grasp of the...
1
by: kersti | last post by:
We've just started to work on a Russian website. In the near future we expect to be running with a Japanese one as well. Currently our setup doesn't allow Russian characters - we need to do any...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.