UTF-8 Support

From PhpCOIN Documentation

Jump to: navigation, search

Contents

UTF-8 "Out of the Box"

Some hackers use multi-byte encoding to circumvent website security. phpCOIN is aware of this, so normally it will NOT support multi-byte character sets for input. This is fine if your site is in English, but not if you happen to be in, for example, Japanese or any other language requiring multi-byte character support.

phpCOIN will, however, support UTF-8 for both input and output with some minor modifications:


Enable UTF-8 Output

In /config.php change $_CCFG['ISO_CHARSET'] from 'iso-8859-1' to 'UTF-8'


Specify Allowed UTF-8 Characters

In config.php add the special characters you want to display or accept as input to $_CCFG['SPECIAL_CHARS']

For example:

$_CCFG['SPECIAL_CHARS'] = 'æøå';


Disable UTF-8 Anti-Hack Code

The following applies only to phpCOIN v1.3.0 and lower. phpCOIN v1.3.1 and higher have already performed this step for you.

Several files in phpCOIN have a single line of code that eliminates UTF-8 input. The line may appear only once in a file, or it may appear multiple times. The line is

 while($var != utf8_decode($var)) {$var = utf8_decode($var);}

You must look in the following files, around the line numbers indicated, and COMMENT OUT the line shown above:

/error.php				line 26, 43

/coin_includes/session_admin.php	line 22, 54, 81
/coin_includes/session_user.php		line 22, 53, 81
/coin_includes/session_set.php		line 72, 114, 142, 163

/coin_modules/whois/details.php		line 7, 25

/coin_setup/setup.php			line 43, 59
/coin_setup/upgrade_to_v11x.php		line 34, 51
/coin_setup/upgrade_to_v120.php		line 34, 51
Personal tools

Inscrita el Registro Mercantil de Mallorca Tomo 2140, Hoja No. PM-51034, Folio 135
This website owned and operated by: Technology Services RPVW S.L. CIF# B57345084
Avda Constitucion 48 Bajos Alaro 07340 Baleares SPAIN
Tel:+34 971518362    Fax: +34 971518368    eMail: support@phpcoin.com