Modules Encoding
Hello,
I'm encountering a double UTF-8 encoding problem in the sitefinity modules I make.
Here is what i do :
- Create an empty module
- In the "ItemSubmitTemplate.ascx" view, I add a label with an accent in the "Text Property, as follows :
<
asp:Label
Text
=
"Accentué"
runat
=
"server"
ID
=
"Label1"
/>
Hi F Lamari,
Apparently this is what happens. I tried with one of our custom modules by saving the .ascx file of the module using different encodings (UTF-8 with/without signature, Windows-1252) - always the accented letters come broken. This appears to be by design. For now we could suggest you to use HTML entity codes for accented letters - here is a table with most commonly used letters:
http://www.starr.net/is/type/htmlcodes.html
Best wishes,
Liubomir
the Telerik team
Thank you very much,
in the meantime, putting my texts in localized variables using a resource class seems to work fine.
My only problem is that my resource class seems not to be persistent (i wrote a post about it). It's registered as long as I stay in the same IIS process (if I reset IIS, my resource class is no longer registered, and can't be found).
F.
Hello ,
Where did you register the resource class? Did you register it on the Application_Start event? Could you send me a link to this post of yours describing your problem?
Kind regards,Hello,
thank you for your answer. I registered the Resource class in the "Initialize" method of the module.
Here is a link to my post : http://www.sitefinity.com/devnet/forums/sitefinity-4-x/sdk/resources-problem-with-the-jobs-intermediate-sample.aspx
F.
Hi ,
I see. I'm not sure if the Initialize method of the module fires on every application restart or just when you install the module for the first time, but it appears that it's fired only one time. This is why I believe it is more convenient to register this in the Application_Start event.
Thank you,
I saw a sample as to how to put the registration of the resources and settings class in the Application_Start in the global.asax on another thread of this forum.
It works well now.
Thank you,
F.