UTF-8 Support
From PhpCOIN Documentation
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:- To enable phpCOIN v1.2.4 and lower to accept and display "special" characters that are usually encoded in UTF-8 you must manually edit source code files according to [this post] on our support forums.
- To enable phpCOIN v1.2.5 to v1.3.0 to accept and display "special" characters that are usually encoded in UTF-8, you need to do three things:
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

