German website Solutions

Source: Internet
Author: User

Because German computer code for Western European languages, international standards for iso-8859-1, so in the Chinese system with plain text can not correctly display the change tone characters, German text must be converted to Unicode encoding in the text Editing tool to display normally. If the change-tone character is stored in Chinese encoding and then opened again, it will become garbled. In particular, when you use the default GB2312 browser to view a German page that does not have a language encoding, there will be garbled characters.
There are 2 kinds of garbled solutions.
1. If necessary, use Unicode (UTF-8) to save German text or edit and save using a Unicode-enabled editor.

2. Modify the change tone character to escape characters


U convert into üä into äö transform into öß into ß • Convert into Ü O converted into Ö Ä converted into Ä

Save after escaping in the database with two functions, display and restore in the editor

Public Function Tihuandeyu (ByVal str As String) as String
str = Replace (str, "U", "ü")
str = Replace (str, "ä", "ä")
str = Replace (str, "O", "ö")
str = Replace (str, "ß", "ß")
str = Replace (str, "U", "Ü")
str = Replace (str, "O", "Ö")
str = Replace (str, "Ä", "Ä")
Return str
End Function


Public Function Huanyuandeyu (ByVal str As String) as String
str = Replace (str, "ü", "U")
str = Replace (str, "ä", "ä")
str = Replace (str, "ö", "O")
str = Replace (str, "ß", "ß")
str = Replace (str, "Ü", "U")
str = Replace (str, "Ö", "O")
str = Replace (str, "Ä", "Ä")
Return str
End Function


3, for the asp.net version of the CMS, can be in Web.config direct agreement <globalization> in the encoding format for iso-8859-1 but this down all the backstage display of Chinese as garbled, to modify all Chinese characters, We also have to be German. In this way customers will see also the standard German.

4, by adjusting the code in the browser display can see German, but each time you have to manually adjust the page code, not show. In addition do not know whether the user of Germany is garbled, whether the need to specify the encoding. This awaits future textual research


Finally, a page encoding format is specified by the node mandatory conventions in Web.config, and the foreground section shows four pages, directly agreeing to encode. In addition, whether you can batch contract in path, because the page is less query.

<location path= "List_cms.aspx" >
<system.web>
<globalization fileencoding= "iso-8859-1" requestencoding= "iso-8859-1" responseencoding= "ISO-8859-1"/>
</system.web>
</location>
<location path= "Index_cms.aspx" >
<system.web>
<globalization fileencoding= "iso-8859-1" requestencoding= "iso-8859-1" responseencoding= "ISO-8859-1"/>
</system.web>
</location>
<location path= "Show_cms.aspx" >
<system.web>
<globalization fileencoding= "iso-8859-1" requestencoding= "iso-8859-1" responseencoding= "ISO-8859-1"/>
</system.web>
</location>
<location path= "Ly.aspx" >
<system.web>
<globalization fileencoding= "iso-8859-1" requestencoding= "iso-8859-1" responseencoding= "ISO-8859-1"/>
</system.web>
</location>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.