It seems that letters not in the a-z range sneak under the radar.

Works as expected:
BulldoG -> bulldog

Terms with characters not within the a-z range:
ÅlanZ -> Ålanz
Õder -> Õder
ÖderÆG -> ÖderÆg
ÆterX -> Æterx
ÔhnoX -> Ôhnox
ÆKLRÖEDØ -> ÆklrÖedØ

It is still a great module though 8o)

Comments

BarisW’s picture

Assigned: Unassigned » BarisW

Ah dang!

That should be fixed by using drupal_strtoupper() instead of strtoupper(), which is what I'm using now. drupal_strtoupper can handle unicode..
Will do in the next release :)

ressa’s picture

Great! I tested it with drupal_strtolower, and it works perfectly.

A temporary fix -- in termcase.module on line 218, replace:

     case TERMCASE_UCFIRST;
       $converted_string = ucfirst($string);
       break;
     case TERMCASE_LOWERCASE;
       $converted_string = strtolower($string);
       break;
     case TERMCASE_UPPERCASE;
       $converted_string = strtoupper($string);

with:

     case TERMCASE_UCFIRST;
       $converted_string = ucfirst($string);
       break;
     case TERMCASE_LOWERCASE;
       $converted_string = drupal_strtolower($string);
       break;
     case TERMCASE_UPPERCASE;
       $converted_string = drupal_strtoupper($string);
BarisW’s picture

Indeed, that's it!
And I am now working on #902396: Allow for Proper Case

There is no drupal substitute for ucwords() so I made this:

     case TERMCASE_PROPERCASE;
       $words = explode(' ', $string);
       foreach ($words as $key => $word) {
        $words[$key] = drupal_ucfirst($word);
       }
       $converted_string = implode(' ', $words);
       break;
BarisW’s picture

Assigned: BarisW » Unassigned
Status: Active » Fixed
ressa’s picture

I updated to and tested the latest version (6.x-1.3) and both "Letters outside a-z range stay capitalized" and "Optional display warnings" (http://drupal.org/node/950468) are now fixed -- thanks a lot!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.