Small problems with Spanish uppercase special characters

Talk about Multi-Language tricks, problems, errors etc.

Moderator: alexandrleonenko

tomasafonso
Senior
Senior
Posts: 48
Joined: Mar 12th, '09, 16:28

Small problems with Spanish uppercase special characters

Postby tomasafonso » Jun 9th, '09, 16:03

Hello.

In view mode i use "case"=>"upper" for all my text fields.

There are problems with spanish tildes (á,é,í,ó and ú) when use "case"=>"upper" (must be converted to Á,É,Í,Ó and Ú).

"Tomás" must be TOMÁS and i get "TOMáS", "Bermúdez" must be "BERMÚDEZ" but i get "BERMúDEZ",..........................

It´s a configuration problems?

Thanks.

administrator
Site Admin
Site Admin
Posts: 6003
Joined: Jan 7th, '09, 23:18
Contact:

Re: Small problems with Spanish uppercase special characters

Postby administrator » Jun 12th, '09, 23:44

This issue will be fixed in the nearest version. You can make all needed changes by yourself:

1. add new method to datagrid.class.php

//--------------------------------------------------------------------------
// Overloaded php function strtolower
//--------------------------------------------------------------------------
protected function StrToUpper($str){
if($this->langName == "en"){
return strtoupper($str);
}else if(function_exists("mb_strtoupper")){
return mb_strtoupper($str, mb_detect_encoding($str));
}else{
return $str;
}
}

2. Find in code of datagrid.class.php this row:
$field_value = strtoupper($field_value);
and change it on this one:
$field_value = $this->strtoupper($field_value);

tomasafonso
Senior
Senior
Posts: 48
Joined: Mar 12th, '09, 16:28

Re: Small problems with Spanish uppercase special characters

Postby tomasafonso » Jun 16th, '09, 07:45

Thank you ver much.


Return to “Multi-Language implementation”