Skip to:
Content

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#460 closed defect (bug) (fixed)

ucfirst cannot be used in non-english sites

Reported by: ddmitry Owned by:
Milestone: Priority: major
Severity: Version:
Component: Keywords: i18n
Cc:

Description

When using localized version where strings in UTF-8 encoding, I have uncorrect representation of first letter. Looked in code and see that problem in ucfirst() function, widely used in /bp-core/bp-core-templatetags.php and others.

Solution can be simple: I have seen on http://ua2.php.net/ucfirst and in comments exist one similar functions worked for me:

function my_mb_ucfirst($str) {

$fc = mb_strtoupper(mb_substr($str, 0, 1));
return $fc.mb_substr($str, 1);

}

Think that ucfirst calls must be replaced with similar function.

thanks.

Change History (3)

#1 @apeatling
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Thanks, I've now included this as a 'bp_core_ucwords()' function.

#2 @apeatling
9 years ago

'bp_core_ucfirst()' I should have said.

#3 @anonymous
8 years ago

  • Milestone Core 1.0 deleted

Milestone Core 1.0 deleted

Note: See TracTickets for help on using tickets.