aspx page encoding

  • Thread starter Thread starter z f
  • Start date Start date
Z

z f

Hi,

i run a web application in a commercial hosting.
my web app need encoding of hebrew, but the default encoding on the hosting
(win2003) is english - westren-european, and my pages are being read as
western european encoding even if i add a content-encoding=windows-1255
which should work.
the only solution i found is to save the pages as unicode, but this is
annoying, because there is no option to set the default page encoding in
visual studio 2003, so i have to change it for each page, and sometimes it
changes back.

is there an option that the pages will be read by IIS/asp.net using a
specific encoding in the configuration of the application.
the problem is that when the pages are saved as ascii and using a
windows-1255 encoding as on the development computer, it does not display
correctly.

please advise.
TIA, z.
 
ASP.NET runtime does not use any META information in the file. It uses
fileEncoding attribute that you can specify in web.config file. Have a look
here

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbtskeditingwebconfigfileforwebformsglobalization.asp

If fileEncoding attribute is not specified, ASP.NET runtime reads file in
default OS codepage unless the file has Unicode or UTF-8 signature.

You can work around VS limitation of lack of default encoding by resaving
new file templates in Unicode or UTF-8 with signature. Then VS will respect
file signatures no matter what META element might specify.

Thanks

Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights
 
anyway i found it and it worked, thanXXXX!!!!!

Mikhail Arkhipov (Microsoft) said:
ASP.NET runtime does not use any META information in the file. It uses
fileEncoding attribute that you can specify in web.config file. Have a look
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbtskeditingwebconfigfileforwebformsglobalization.asp

If fileEncoding attribute is not specified, ASP.NET runtime reads file in
default OS codepage unless the file has Unicode or UTF-8 signature.

You can work around VS limitation of lack of default encoding by resaving
new file templates in Unicode or UTF-8 with signature. Then VS will respect
file signatures no matter what META element might specify.

Thanks

Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top