473,419 Members | 1,925 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,419 software developers and data experts.

Russian Characters and ASP.Net

(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 charactersproperly. Is .net capable of reading Russian characters from anXML file created with ASP? The application that the users use toupdate the XML file is still written in ASP and not in ASP.Net.Thanks in advance.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>5hK79qV8jUuruWtcL1GaXQ==</Id>
Nov 19 '05 #1
2 2867
"Ross Noe via .NET 247" <an*******@dotnet247.com> wrote in message news:e9**************@TK2MSFTNGP14.phx.gbl...
I created an XML file using ASP that has Russian characters. For some
reason ASP.Net doesn't read the Russian characters properly. Is .net
capable of reading Russian characters from an XML file created with ASP?


Almost certainly so, this is probably a difference in encoding between the
ASP application that generated the XML document containing Russian
characters and the encoding used by ASP.NET to read them. Assuming
the ASP and ASP.NET applications are on the same web server, then
they had access to the same code pages, therefore ASP.NET can read
the document once it is reading it using the correct Encoding. You just
need to tell it which one.

The XML document should be created with an XMLDecl that contains
an encoding pseudo-attribute. The correct encoding should be specified
there by the ASP application when it produces the XML file. If you had
previously used a similar ASP application to consume the XML file in the
past, it's possible you may not have noticed the XML file was missing this
necessary encoding declaration because both of your applications had a
tacit agreement as to the encoding going on. The encoding declaration is
important for different platforms to successfully interoperate with each
other.

In ASP.NET, try loading the XML file through a StreamReader and make
sure you create the StreamReader by passing it an Encoding (if you're not
sure which ones to use, start with the obvious Unicode (UTF-16) one and
if that doesn't work then proceed from there to GetEncoding( ) for various
Russian code pages, see the documentation for the System.Text.Encoding
class for more info on getting the encoding associated with a code page).

I suggest StreamReader because you need to take control of precisely what
encoding the XmlTextReader that it'll be wrapped by (if not by you, then by
the Load( ) method of XmlDocument) uses to read it. You don't have this
degree of control if you use one of the short-cut overloads that takes a file
name.
Derek Harmon
Nov 19 '05 #2
Russian characters have always been a problem. I remember the first Russian
characters I encountered - Boris Badenov and Natasha Fatale, on the Ricky
and Bullwinkle cartoons. Boy, they were always causing trouble! Don't forget
Nikita Kruschev, who once pounded his shoe on a table at the U.N. to make a
point. And of course today we have Vladimir Putin, who, while certainly
lacking the outward hostility of his precursors, still manages to throw a
wrench in the works now and then.

Wish I could tell you what to do about them. Hopefully, at least I've
managed to relieve some of your tension.

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Ross Noe via .NET 247" <an*******@dotnet247.com> wrote in message
news:e9**************@TK2MSFTNGP14.phx.gbl...
(Type your message here)

--------------------------------
From: Ross Noe
I created an XML file using ASP that has Russian characters. For some reason
ASP.Net doesn't read the Russian characters properly. Is .net capable of
reading Russian characters from an XML file created with ASP? The
application that the users use to update the XML file is still written in
ASP and not in ASP.Net. Thanks in advance.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>5hK79qV8jUuruWtcL1GaXQ==</Id>
Nov 19 '05 #3

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: Sonu | last post by:
Hello, I have a multilingual application, to which I am adding Russian. The prolem is that all the dialog boxes & Menus are showing junk characters instead of Cyrillics!! while my window contents...
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...
1
by: Gerald | last post by:
Hi group, my question is both for asp.net. I have to do a website in Russian. So far, I have some problems with the russian character. Can someone give me good tips on how to make non ascii...
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...
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: sandeepindia | last post by:
I m using PHP Version 4.3.2 & Mysql version 3.23.58(No collation etc). My site is in shift JIS encoding. I've both japanese users & russian users. They have entered their member profile in their...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.