Storages & Files SystemLanguageSupport
SystemLanguageSupport read only property (with parameters)

Returns information about the code page and local support installed on the system.


Set coll = object.SystemLanguageSupport( [what [,flags]])


what - numeric constant. Specifies what information to be extracted. Default is 0. Currently supported constants:
0 - System code pages
1 - System locales

flags - a combination of flags. Default is 1 (Installed code pages or installed locales). The meaning of the flags:
&H01 - installed
&H02 - Supported
&H04 - Alternative sorts (can be used only for locales:  what = 1)
Most often the applications will need to fetch information about the installed features, so the default flag value is 1. When locales are queried a combination of installed or supported with the alternative sorts flag can be used. So in this case the effective parameter will be &H05 (installed locales and their alternative sorts).

Return result:  The property returns a collection implemented using the VarDictionary object. Each element contains a string that describes a code page or a locale. To make the collection convenient for various applications the key/name of each element equals its value (for example this allows you to test if certain code page is supported by using the Key method e.g. coll.Key("1252") asks if 1252 code page is in the collection). The result can be enumerated or otherwise used further.


Set sf = Server.CreateObject("newObjects.utilctls.SFMain")
Set codepages = sf.SystemLanguageSupport(0,1)
If codepages("1251") = "1251" Then
  Response.Write "Cyrillic code page is installed on this machine"
    Response.Write "Cyrillic code page is NOT installed on this machine"
End If 
Set sf = Server.CreateObject("newObjects.utilctls.SFMain")
Set codepages = sf.SystemLanguageSupport(0,1)
Response.Write "Installed code pages<BR>"
For I = 1 To codepages.Count
  Response.Write codepages(I) & "<BR>"


The realization of this member returns "detached" data. I.e. the result returned is a snap shot of what was detected during the method call. If you need the fetched information throughout the application it is recommended to keep the collection somewhere and query it whenever the information is needed instead of calling the property frequently. This recommendation comes from the realization of these features in the Windows OS. It requires application level locking and thus during the call the performance of other routines from the library may decrease.

Usually the information is needed before the actual application work. It can be used by ALP applications that need to know if they can display correctly texts in a specific language. Almost any code page contains the ASCII symbols as subset, but if the applications needs to display information in language other then English (for example Russian or Japanese) it should try to see first if the system has the required code page installed. For the list of some of the most popular code page numbers you can see SFStream.codePage.

Applies to: SFMain object

Supported on:

Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later


newObjects Copyright 2001-2006 newObjects [ ]