1

I'm trying to add some specific characters to my

unichar rusLetter [] = { 'Ж', 'Й', }

I want actually to add all letters from russian alphabet. Using above line of code, i get an error:

Character too large for enclosing character literal type

Any ideas how to fix that? And maybe there is an easier way to add all letters, not to type all of them.

Thanks

rmaddy
  • 314,917
  • 42
  • 532
  • 579
iDev_91
  • 317
  • 8
  • 15
  • 3
    See the unaccepted answer to the duplicate question for an easy solution (put an `L` in front of each char literal). – rmaddy Sep 01 '13 at 23:53

1 Answers1

1

the ' literal (single quote) means a char and that is too small to hold the symbols. In ObjC use an NSString to hold it

NSString *rusLetters = @"ЖЙ";

unichar c1 = [rusLetters characterAtIndex:0];
unichar c2 = [rusLetters characterAtIndex:1];
Daij-Djan
  • 49,552
  • 17
  • 113
  • 135