HtmlFragmentInclude localization issue

This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.

This thread is closed to new posts. You must sign in to post in the forums.
3/3/2008 10:41:53 AM
Gravatar
Total Posts 2

HtmlFragmentInclude localization issue

I have problem loading Chinese into HtmlFragmentInclude, they are displayed as somthing like "�Ϻ��׼�����������" and if I choose viewing source code, it's the same unrecoganizable character sequence.

I am guessing it's a encoding related problem but don't how to solve it. My website has been configured to Chinese language and it works well otherwise. Any thoughts will be appreciated, Thanks.

3/3/2008 1:29:34 PM
Gravatar
Total Posts 18439

Re: HtmlFragmentInclude localization issue

Hi,

I think the problem is that utf-8 encoded content is expected. The relavent code is this:

StreamReader sr  = file.OpenText();
this.lblInclude.Text = sr.ReadToEnd();
    sr.Close();

file.OpenText() opens a StreamReader with utf-8 encoding to read the contents of the text file.

I'm not sure if there is a solution other than to encode your content as utf-8. I'm really no expert on character sets and encoding, but my understanding is that utf-8 supports many languages, but I think yor content files are not in utf-8 and would need to be converted to utf-8 to work with the existing code.

Hope it helps.

If you find a solution, please let me know.

Joe

 

3/4/2008 10:55:21 AM
Gravatar
Total Posts 2

Re: HtmlFragmentInclude localization issue

Your method works Thank you!

You must sign in to post in the forums. This thread is closed to new posts.