Sideway
output.to from Sideway
Draft for Information Only

Content

Response Object
 Response.LCID Property
   Syntax:
   Parameters:
   Remarks:
   Examples:

Response Object

Another important function of Response object is the control of ASP engine for the HTML output.

Response.LCID Property

Response.LCID property set the value of LCID for the data of response output to specify the format of dates, times, and currency for different geographical locale for the server.

Syntax:

Response.LCID [=LocaleID]

 Or in an ASP file. Imply

<% Response.LCID [=LocaleID] %>

Parameters:

LocaleID

The parameter "LocaleID" is the locale Identifer to represent the locale formatting used for the HTML output. The data type of "LocaleID" is integer. The possible LocaleID are.

LCID Country / Region Language
1078 South Africa Afrikaans
1052 Albania Albanian
5121 Algeria Arabic
15361 Bahrain Arabic
3073 Egypt Arabic
2049 Iraq Arabic
11265 Jordan Arabic
13313 Kuwait Arabic
12289 Lebanon Arabic
4097 Libya Arabic
6145 Morocco Arabic
8193 Oman Arabic
16385 Qatar Arabic
1025 Saudi Arabia Arabic
10241 Syria Arabic
7169 Tunisia Arabic
14337 U.A.E. Arabic
9217 Yemen Arabic
1067 Armenia Armenian
2092 Azerbaijan Azeri (Cyrillic)
1068 Azerbaijan Azeri (Latin)
1069 Spain Basque
1059 Belarus Belarusian
1026 Bulgaria Bulgarian
1027 Spain Catalan
3076 Hong Kong S.A.R. Chinese
5124 Macau S.A.R. Chinese
2052 People's Republic of China Chinese (Default Chinese-Simplified Locale ID)
4100 Singapore Chinese
1028 Taiwan Chinese
1050 Croatia Croatian
1029 Czech Republic Czech
1030 Denmark Danish
1125 Maldives Divehi
2067 Belgium Dutch
1043 Netherlands Dutch
3081 Australia English
10249 Belize English
4105 Canada English
9225 Caribbean English
6153 Ireland English
8201 Jamaica English
5129 New Zealand English
13321 Republic of the Philippines English
7177 South Africa English
11273 Trinidad and Tobago English
2057 United Kingdom English
1033 United States English (Default English Locale ID)
12297 Zimbabwe English
1061 Estonia Estonian
1080 Faeroe Islands Faroese
1065 Iran Farsi
1035 Finland Finnish
2060 Belgium French
3084 Canada French
1036 France French (Default French Locale ID)
5132 Luxembourg French
6156 Principality of Monaco French
4108 Switzerland French
1071 Former Yugoslav Republic of Macedonia FYRO Macedonian
1110 Spain Galician
1079 Georgia Georgian
3079 Austria German
1031 Germany German (Default German Locale ID)
5127 Liechtenstein German
4103 Luxembourg German
2055 Switzerland German
1032 Greece Greek
1095 India Gujarati
1037 Israel Hebrew
1081 India Hindi
1038 Hungary Hungarian
1039 Iceland Icelandic
1057 Indonesia Indonesian
1040 Italy Italian (Default Italian Locale ID)
2064 Switzerland Italian
1041 Japan Japanese
1099 India Kannada
1087 Kazakhstan Kazakh
1111 India Konkani
1042 Korea Korean
1088 Kyrgyzstan Kyrgyz
1062 Latvia Latvian
1063 Lithuania Lithuanian
2110 Brunei Darussalam Malay
1086 Malaysia Malay
1102 India Marathi
1104 Mongolia Mongolian
1044 Norway Norwegian (Bokmål)
2068 Norway Norwegian (Nynorsk)
1045 Poland Polish
1046 Brazil Portuguese
2070 Portugal Portuguese
1094 India Punjabi
1048 Romania Romanian
1049 Russia Russian
1103 India Sanskrit
3098 Serbia and Montenegro Serbian (Cyrillic)
2074 Serbia and Montenegro Serbian (Latin)
1051 Slovakia Slovak
1060 Slovenia Slovenian
11274 Argentina Spanish
16394 Bolivia Spanish
13322 Chile Spanish
9226 Colombia Spanish
5130 Costa Rica Spanish
7178 Dominican Republic Spanish
12298 Ecuador Spanish
17418 EI Salvador Spanish
4106 Guatemala Spanish
18442 Honduras Spanish
2058 Mexico Spanish
19466 Nicaragua Spanish
6154 Panama Spanish
15370 Paraguay Spanish
10250 Peru Spanish
1034 Spain Spanish
14346 Uruguay Spanish
8202 Venezuela Spanish
3082 Spain Spanish - Modern Sort (Default Spanish Locale ID)
1089 Kenya Swahili
2077 Finland Swedish
1053 Sweden Swedish
1114 Syria Syriac
1097 India Tamil
1092 Tatarstan Tatar
1098 India Telugu
1054 Thailand Thai
1055 Turkey Turkish
1058 Ukraine Ukrainian
1056 Islamic Republic of Pakistan Urdu
2115 Uzbekistan Uzbek (Cyrillic)
1091 Uzbekistan Uzbek (Latin)
1066 Viet Nam Vietnamese
1106 United Kingdom Welsh

Remarks:

The Response.LCID property is used to specify the locale format of dates, times and currencies of a page. The locale format is only to specify the display format, not the encoded code.

Since a locale ID is used to represent  a predefined locale format, in order to use the specified locale ID in a page or application, the corresponding locale group should be installed through the adding of locale groups in the Regional and Language Options in the Control Panel.

And a locale format is always needed for for formating the locale format of dates, times and currencies of every response body output. If Response.LCID is not explicitly set in a page, the value of LCID for the page should be determined from other settings.

If sessions are enabled, the Response.LCID can then be implicitly set by the Session.LCID.

If sessions are not enabled and the @LCID is present in the ASP file, the Response.LCID can then be set by the  @LCID.

If the @LCID is not present in the ASP file, the Response.LCID can then be set by the ASPLCID metabase property.

If the ASPLCID metabase property is also not set or is set to 0, the Response.LCID is then set by the system locale.

Unlike Response.CodePage, Response.LCID can be used to set the locale format multiple times with different format in a page. However, some locales with characters should be matched with the code page in order to display all characters correctly in a page.

Besides setting the Response.LCID not only change the locale of the ASP application, the Response.LCID also change the locale of the scipting engine. But when using the VBScript function setLocale(), the setLocale() function can change the locale for the scripting engine only.

Since the system default locale will be used when there is no locale setting in a web page, sometimes it is not necessary to set a locale in the web page for those web client with matched system default locale. However, setting the locale for a web page is alway necessary for formating the response output correctly for all web client in the WWW.

So in order to display the specified format correctly, the explicit setting of Response.LCID or Session.LCID should be set before sending the formatted locale output to the client.

And therefore if locale is set in the page,  the code page is also set in a page, the Response.Charset should also be set in order to ensure the response output is displayed correctly for all web client in the WWW. So that the server can encode the page according to the specified code page with the specified locale format before sending the response output to the client and the client can therefore decode the page according to the specified charset correctly.

Similarly, in order to test web pages that use different locales, code pages and character sets in a client computer, the corresponding language packs should also be installed through the adding of language packs in the Regional and Language Options in the Control Panel.

Examples:

  • Response.CodePage with value "65001" with @CodePage=65001 and Response.CharSet with value "utf-8",  and the ASP file is saved in utf-8 format. And Response.LCID with value "1033",  "2052"

    ASP script command:
    ASP VbScript Command:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <title>Sample Page</title>
            <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        </head>
        <body>
    <%@CodePage=65001 %>
    <% Response.CodePage=65001 %>
    <% Response.CharSet="utf-8" %>
    <% Response.LCID=1033 %>
    <%=FormatDateTime(Date,1)&"<br />"%>
    <%=FormatDateTime(Time,3)&"<br />"%>
    <%=FormatCurrency(1000)&"<br />"%>
    <%=FormatNumber(50, 3, 0, 0, -1)&"<br />"%>
    <% Response.LCID=3079 %>
    <%=FormatDateTime(Date,1)&"<br />"%>
    <%=FormatDateTime(Time,3)&"<br />"%>
    <%=FormatCurrency(1000)&"<br />"%>
    <%=FormatNumber(50, 3, 0, 0, -1)&"<br />"%>
        </body>
    </html>
    HTTP Response Output:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <title>Sample Page</title>
            <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        </head>
        <body>
    Monday, September 20, 2021<br />8:38:27 PM<br />$1,000.00<br />50.000<br />Montag, 20. September 2021<br />20:38:27<br />1.000,00 €<br />50,000<br />
        </body>
    </html>
    HTML Web Page Embedded Output:

©sideway

ID: 120200011 Last Updated: 2/6/2012 Revision: 0 Ref:

close

References

  1. Active Server Pages,  , http://msdn.microsoft.com/en-us/library/aa286483.aspx
  2. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929%28v=vs.90%29.aspx
  3. ASP Best Practices,  , http://technet.microsoft.com/en-us/library/cc939157.aspx
  4. ASP Built-in Objects,  , http://msdn.microsoft.com/en-us/library/ie/ms524716(v=vs.90).aspx
  5. Response Object,  , http://msdn.microsoft.com/en-us/library/ms525405(v=vs.90).aspx
  6. Request Object,  , http://msdn.microsoft.com/en-us/library/ms524948(v=vs.90).aspx
  7. Server Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525541(v=vs.90).aspx
  8. Application Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525360(v=vs.90).aspx
  9. Session Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms524319(8v=vs.90).aspx
  10. ASPError Object,  , http://msdn.microsoft.com/en-us/library/ms524942(v=vs.90).aspx
  11. ObjectContext Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525667(v=vs.90).aspx
  12. Debugging Global.asa Files,  , http://msdn.microsoft.com/en-us/library/aa291249(v=vs.71).aspx
  13. How to: Debug Global.asa files,  , http://msdn.microsoft.com/en-us/library/ms241868(v=vs.80).aspx
  14. Calling COM Components from ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524620(v=VS.90).aspx
  15. IIS ASP Scripting Reference,  , http://msdn.microsoft.com/en-us/library/ms524664(v=vs.90).aspx
  16. ASP Keywords,  , http://msdn.microsoft.com/en-us/library/ms524672(v=vs.90).aspx
  17. Creating Simple ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524741(v=vs.90).aspx
  18. Including Files in ASP Applications,  , http://msdn.microsoft.com/en-us/library/ms524876(v=vs.90).aspx
  19. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929(v=vs.90).aspx
  20. FileSystemObject Object,  , http://msdn.microsoft.com/en-us/library/z9ty6h50(v=vs.84).aspx
  21. http://msdn.microsoft.com/en-us/library/windows/desktop/ms675944(v=vs.85).aspx,  , ADO Object Model
  22. ADO Fundamentals,  , http://msdn.microsoft.com/en-us/library/windows/desktop/ms680928(v=vs.85).aspx
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019