Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

Encoding Module Documentation

The Encoding module allows you to look up a file's text encoding.

The functions within this module may or may not be governed by a feature list. The required feature list may vary from function to function, to review a total list of the available features sets on a cPanel server, please see "Feature Manager" in WHM.

Encoding::guess_file_opts

API Version: 2 - Click here for documentation
Description: Attempt to retrieve a file's encoding. This function is similar to Encoding::guess_file but presents the results as part of a list of all character encodings known to cPanel.
Parameters:  
  file (string)
  The relative path to the file you wish to query. '/' represents your home directory.
Returns:  
 
<data>
  <map> A string value that contains the encoding the file uses. (e.g. ansi_x3.110-1983)</map>
</data>

Encoding::guess_file

API Version: 2 - Click here for documentation
Description: Retrieve a file's encoding.
Parameters:  
  file (string)
  The relative path to the file you wish to query. / is the user's home directory.
Returns:  
 
<data>
  <file> A string value that contains the full path to the file.</file>
  <encoding> A string value that contains the character encoding if it is found. (e.g. UTF-8) Note: 'ISO-8859-1' is returned if the function is unable to find the file's encoding.</encoding>
</data>

Topic revision: r2 - 26 Mar 2012 - 15:47:18 - Main.JenniferDoubrava