lang::catalog::default_charset_if_unsupported (private)

 lang::catalog::default_charset_if_unsupported charset

Defined in packages/acs-lang/tcl/lang-catalog-procs.tcl

Will return the system default charset and issue a warning in the log file if the given charset is not supported by tcl. Otherwise the given charset is simply returned.

Parameters:
charset
Authors:
Jeff Davis
Peter Marklund <peter@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 lang::catalog::export_to_file lang::catalog::export_to_file (private) lang::catalog::default_charset_if_unsupported lang::catalog::default_charset_if_unsupported lang::catalog::export_to_file->lang::catalog::default_charset_if_unsupported lang::catalog::read_file lang::catalog::read_file (private) lang::catalog::read_file->lang::catalog::default_charset_if_unsupported

Testcases:
No testcase defined.
Source code:
    set ns_charsets [concat [ns_charsets] [encoding names]]
    # Do case insensitive matching
    if {[lsearch -regexp $ns_charsets "(?i)^${charset}\$"] < 0} {
        #set default_charset [encoding system]
        # LARS: Default to utf-8
        set default_charset utf-8
        ns_log Warning "charset $charset not supported by tcl, assuming $default_charset"
        set charset_to_use $default_charset
    } else {
        set charset_to_use $charset
    }

    return $charset_to_use
Generic XQL file:
packages/acs-lang/tcl/lang-catalog-procs.xql

PostgreSQL XQL file:
packages/acs-lang/tcl/lang-catalog-procs-postgresql.xql

Oracle XQL file:
packages/acs-lang/tcl/lang-catalog-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: