Skip to:

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#460 closed defect (bug) (fixed)

ucfirst cannot be used in non-english sites

Reported by: ddmitry's profile ddmitry Owned by:
Milestone: Priority: major
Severity: Version:
Component: Keywords: i18n


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 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.


Change History (3)

#1 @apeatling
15 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
15 years ago

'bp_core_ucfirst()' I should have said.

#3 @(none)
15 years ago

  • Milestone Core 1.0 deleted

Milestone Core 1.0 deleted

Note: See TracTickets for help on using tickets.