• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Uppercasing text as it is entered
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Uppercasing text as it is entered


  • Subject: Uppercasing text as it is entered
  • From: Todd Ransom <email@hidden>
  • Date: Thu, 23 Aug 2007 11:51:16 -0700

I have an app with a text view where some of the text needs to be automatically upppercased as it is entered. I do this using a custom attribute and a subclass of NSTextStorage that returns an uppercase version of the text whenever that attribute is found. This works great for English language text but I am running into problems with some unicode characters.

I am using -[NSString uppercaseString] to uppercase the text but I am getting an unexpected result. The German ß character returns "SS" from uppercaseString.

In other cases entering characters using multiple keystrokes does not work with my method. For instance, typing "opt-e e" to enter a é character is broken because of the multiple keystrokes used to enter the character. -[NSString uppercaseString] returns the correct value but my NSTextStorage subclass returns a simple capitol E.

Is the ß thing a bug in NSString? Does anyone have any advice on a better way to uppercase text as it is entered? Remember that not all text should be uppercased, only text with a particular custom attribute applied to it.

thanks in advance,
Todd Ransom
Return Self Software
http://returnself.com/
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Uppercasing text as it is entered
      • From: glenn andreas <email@hidden>
    • Re: Uppercasing text as it is entered
      • From: mmalc crawford <email@hidden>
    • Re: Uppercasing text as it is entered
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Selecting NSPopUpButton in NSTableView
  • Next by Date: Re: Getting the current line
  • Previous by thread: Selecting NSPopUpButton in NSTableView
  • Next by thread: Re: Uppercasing text as it is entered
  • Index(es):
    • Date
    • Thread