[Mono-aspnet-list] Globalization still not working in Mono 2.10
H .
test051102 at hotmail.com
Wed May 11 04:22:52 EDT 2011
Hi Robert,
your suggestion might help, but it is just a
workaround and not a solution. FireFox (win32 and Linux) can open and
display those files without any problems. So it should be assumed that
Mono can do this as well. I do currently not understand how and where
Mono changes static html files when they are beeing served.
I
have done some more testings and found out the reason, why my other web
applications are still producing encoding problems when beeing deployed
on Mono. The problem is, that the code-behind files are in iso-8859-1
format. After converting them to utf-8 format, everything is working as
expected. Of course, this only applies when parts of the page are
generated using code-behind code.
So, there are 2 unresoved problems left:
(1) Mono cannot display iso-8859-1 encoded html files
(2) Mono get's confused, when code-behind files are encoded in iso-8859-1 format
So
for the current implementation of Mono it is strictly required to
convert all text files of an ASP.NET application to the utf-8 format to
prevent difficult to track down problems. It took me a lot of affort to
find out this information.
If this is still not considered to be
something that can be improved, it would be nice, if this information
would be added to
http://www.mono-project.com/Guide:_Porting_ASP.NET_Applications.
Best regards,
Martin
> To: mono-aspnet-list at lists.ximian.com
> From: robertj at gmx.net
> Date: Thu, 5 May 2011 23:14:15 +0200
> Subject: Re: [Mono-aspnet-list] Globalization still not working in Mono 2.10
>
> On 05.05.2011 21:29, H . wrote:
> >
> > Hi Robert,
> >
> > thanks for the information. Yes, I am testing under Windows but I want to deploy my applications under Linux in the future. I have tested the following
> > <globalization fileEncoding="iso-8859-1" culture="de-DE" uiCulture="de-DE"/> section.
> >
> > This is what I found out:
> >
> > fileEncoding="utf-8": Default.aspx must be utf-8, test.htm must be utf-8
> > fileEncoding="iso-8859-1": Default.aspx can be utf-8 or iso-8859-1, test.htm must be utf-8!?!
>
> http://msdn.microsoft.com/en-us/library/hy4kkhe0%28v=VS.80%29.aspx says
> that fileEncoding only applies to ASP.NET handlers. That's why test.htm
> is unaffected by this setting.
>
> >> From the results I conclude the following:
> > Mono cannot display standard html files encoded in iso-8859-1. The problem for me is, that I have to display certain static html files from a database. These files' encodings are corrupted in Mono.
>
> I took a look at Mono's code and it seems that static files are
> indeed served as is, w/out any charset set etc. This seems to
> match MS' docs:
>
> http://msdn.microsoft.com/en-us/library/ms404287%28v=VS.80%29.aspx
>
> So try to add a meta header to these html files:
>
> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
>
> Robert
>
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20110511/ad5edbca/attachment.html
More information about the Mono-aspnet-list
mailing list