General Introduction
Features
Settings
Email system
Date and Time
URL rewrite
Special constants
Special variables
Complex logic in filter
AddBufferContent
AddChainItem
AddHeadScript
AddHeadString
AddPanelButton
AddViewContent
AuthForm
CaptchaCheckCode
CaptchaGetCode
ConvertCharset
ConvertCharsetArray
CopyFileAccessPermission
GetCSS
GetCurDir
GetCurPage
GetCurPageParam
GetCurUri
GetDirProperty
GetDirPropertyList
GetException
GetFileAccessPermission
GetFileContent
GetFileRecursive
GetMenu
GetMenuHtml
GetMenuHtmlEx
GetMeta
GetNavChain
GetPageProperty
GetPagePropertyList
GetPanel
GetProperty
GetPublicShowMode
GetShowIncludeAreas
GetSiteByDir
GetTemplatePath
GetTitle
GetUserRight
GetUserRoles
IncludeAdminFile
IncludeComponent
IncludeFile
IncludeString
IsHTTPS
MoveJSToBody
RemoveFileAccessPermission
ResetException
SaveFileContent
SetAdditionalCSS
SetCurPage
SetDirProperty
SetFileAccessPermission
SetPageProperty
SetTemplateCSS
SetTitle
ShowBanner
ShowBodyScripts
ShowCSS
ShowHead
ShowHeadScripts
ShowHeadStrings
ShowMeta
ShowNavChain
ShowPanel
ShowProperty
ShowSpreadCookieHTML
ShowTitle
ShowViewContent
ThrowException
get_cookie
set_cookie
ConvertCharset
string CMain::ConvertCharset( string, string charset_in, string charset_out );
The method is used to convert strings with different encodings. Non-static method.
Note: this method is a wrapper - for the iconv. If the iconv is unavailable, the method is used without it (with reduced performance).
Parameters
Parameter | Description |
---|---|
string | String to be converted |
charset_in | Initial encoding |
charset_out | Final encoding |
Returned value
Returns the string in the required encoding.
Examples of use
Converting the $str string from Unicode into cp1251.
$str = $APPLICATION->ConvertCharset($str, "Unicode", "windows-1251");Similar execution:
$str = iconv('CP1251', 'UTF-8', $str);
© «Bitrix24», 2001-2024
Up