Skip to content

Dart String toUpperCase and toLowerCase methods are incorrect for Turkish. #28

Closed
@DartBot

Description

@DartBot

This issue was originally filed by @mdakin


String toLowerCase and toUpperCase does not work correctly for Turkish dotless i and capital dotted i.

Run this application (Unfortunately http://try-dart-lang.appspot.com/ loses Turkish characters after I tried to link it):

main() {

  // Expected conversions
  String trUpper = "A,B,C,Ç,D,E,F,G,Ğ,H,I,İ,J,K,L,M,N,O,Ö,P,R,S,Ş,T,U,Ü,V,Y,Z";
  String trLower = "a,b,c,ç,d,e,f,g,ğ,h,ı,i,j,k,l,m,n,o,ö,p,r,s,ş,t,u,ü,v,y,z";
  
  // Actual conversions
  String dartTrUpper = trLower.toUpperCase();
  String dartTrLower = trUpper.toLowerCase();
  
  if (dartTrUpper != trUpper) {
    print ("Incorrect Turkish toUpper conversion. \nExpected: ${trUpper} \nFound: ${dartTrUpper}");
  }
  if (dartTrLower != trLower) {
    print ("Incorrect Turkish toLower conversion. \nExpected: ${trLower} \nFound: ${dartTrLower}");
  }
}

Expected: Program does not print anything.
Actual: Prints 2 messages with outputs.

Metadata

Metadata

Assignees

Labels

area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).closed-not-plannedClosed as we don't intend to take action on the reported issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions