My Account | Buy CometChat

documentation

Usernames appear incorrectly

This article fixes the username issue in vBulletin for sites using encoding/charset other than UTF-8. This modification is for vBulletin only. Do not apply on any other integration.

Solution

  • Find out vBulletin charset/encoding.

This can be found by logging into the vBulletin Admin Control Panel

  • Open integration.php in a text editor

Scroll down to line 117 and find the following piece of code:

function processName($name) {
//  For vBulletin users ONLY
//  Uncomment the next two lines and change only ISO-8859-9 to your site encoding type

//  $name = iconv("UTF-8", "ISO-8859-1", $name);
//  $name = iconv("ISO-8859-9", "UTF-8", $name);

    return $name;
}
  • Modify the code

If your encoding is Windows-1256, replace the above lines with:

 function processName($name) {
//  For vBulletin users ONLY
//  Uncomment the next two lines and change only ISO-8859-9 to your site encoding type

    $name = iconv("UTF-8", "ISO-8859-1", $name);
    $name = iconv("Windows-1256", "UTF-8", $name);

    return $name;
}