template::util::set_file_encoding (public)

 template::util::set_file_encoding file_channel_id

Defined in packages/acs-templating/tcl/util-procs.tcl

Set encoding of the given file channel based on the OutputCharset parameter of AOLserver. All ADP, Tcl, and txt files are assumed to be in the same charset.

Parameters:
file_channel_id - The id of the file to set encoding for.
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 test_read_write_file read_write_file (test acs-templating) template::util::set_file_encoding template::util::set_file_encoding test_read_write_file->template::util::set_file_encoding template::util::read_file template::util::read_file (public) template::util::read_file->template::util::set_file_encoding template::util::write_file template::util::write_file (public) template::util::write_file->template::util::set_file_encoding

Testcases:
read_write_file
Source code:
    set output_charset [ns_config "ns/parameters" OutputCharset]
    set tcl_charset [ns_encodingforcharset $output_charset]

    if { $tcl_charset ne "" } {
        fconfigure $file_channel_id -encoding $tcl_charset
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: