Hi, for this page, what we do is that we have an XML control on the ASPX
which we use to dynamically create a table based on data returned from our
business objects. This dynamic table that we render contains texts and
numbers that the user can click on to go a pop up that will show more info.
When the user clicks on the link, the javascript grabs the necessary
information from the dynamically render page and pass them as query string
parameters. So, the string "Chèques" is part of the data that is returned
from our business object and dynamically rendered on the screen. The string
is also used in the query string parameter when the user clicks on
appropriate link. What is happening now is that the page renders properly
with the correct text. The javascript is grabbing the correct test and
calling the popup window ASPX page with the correct query string parameter.
So if I put an alert() call in the javascript, I will see
"<RowID>Chèques</RowID>". However, when the popup window ASPX page's code
behind Page_Load() is called, the call to Request.QueryString() returns
"<RowID>Chques</RowID>". In the web.config, I have request, response, and
file encoding set to utf-8. So it seems like somewhere between when the page
is submitted, and the Page_Load() event is fired, the "è" character was
removed for some reason. The ASP.Net project is currently on framework v1.0
and upgrading is not an option currently.
Also, I have Window-1252 character code page installed according to
"Regional and Language Options" in control panel. Not sure how to set it as
the default code page though.
Any ideas or suggestions to solve this problem would be greatly appreciated.
Thanks.
"Joerg Jooss" wrote:
John Horst wrote:
Lu:
Open your aspx page and select "Save <<page name>> As..." The Save
button in the dialog should have a down arrow at the right of the
button. Click this and select "Save With Encoding". You will be
asked if you want to overwrite the file. Click Yes to this. You
will then get a dialog asking you to select Endcoding and Line
Endings. Leave the Line Endings alone, but select the "Unicode -
Codepage 1200" option and save the file.
That won't help, but rather be harmful, without changing the
fileEncoding attribute in web.config to UTF-16LE. Since Lu's already
using UTF-8, this is a waste of time. The files must be stored as UTF-8
instead.
What is happening is VS.NET is saving your aspx file an an ASCII file,
which only has one byte per character and as such cannot support
foreign language character sets. When you save it with encoding, it
will save it as a text file, but it will keep the second Unicode byte
with the file.
That's not correct. ASP.NET seems to use the platform's default
encoding if no fileEncoding is specified, just like VS .NET does. I say
"seems", because that behaviour isn't documented.
If that platform default is for example Windows-1252, you can easily
save many special characters used in Western Europe natively in your
source files.
Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de