• 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
Re: Inserting localized text to NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inserting localized text to NSTextView


  • Subject: Re: Inserting localized text to NSTextView
  • From: Murat Konar <email@hidden>
  • Date: Wed, 18 Apr 2007 11:30:56 -0700


On Apr 18, 2007, at 11:17 AM, email@hidden wrote:

I have an app with a NSTextView. If, for example, the user selects Hebrew in the system preference International panel Input Menu, typing abcd onto the text view produces Hebrew. However, if I programatically insert abcd using [textView insertText:@"abcd"] then English, not Hebrew appears in the text view. How can I programatically insert text onto a text view so that it appears just as the user typed the text? Thanks.

The translation from "abcd" to whatever Hebrew you're seeing happens at the keyboard. In other words, typing "abcd" in Hebrew mode doesn't result in string @"abcd".


To insert Hebrew text into a text view, you have to, well, insert Hebrew text.

Note also that you can't generally use string literals like @"abcd" embedded in source code for many languages (source files are parsed as UTF-8, I believe, and many scripts require UTF-16 to get all characters). See
<http://developer.apple.com/documentation/MacOSX/Conceptual/ BPInternational/Articles/StringsFiles.html> and the Hillegas book.


_murat
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Inserting localized text to NSTextView
      • From: "Sean McBride" <email@hidden>
References: 
 >Inserting localized text to NSTextView (From: email@hidden)

  • Prev by Date: Re: Inserting localized text to NSTextView
  • Next by Date: Re: Inserting localized text to NSTextView
  • Previous by thread: Re: Inserting localized text to NSTextView
  • Next by thread: Re: Inserting localized text to NSTextView
  • Index(es):
    • Date
    • Thread