Hello,
I am writing a very simple application using camelbones. The app has
two widgets in a window: a button, and an NSTextView. When the button
is clicked, I replace the contents of the NSText widget. Basically,
it's a simplistic flashcard app.
Now, everything is fine and dandy as long as I'm using plain ol' ascii
text. I set the NSText contents using the 'setString' function. But,
if the text is some japanese, say, euc-jp or shift-jis or utf-8
encoded, then all I get is garbage. "makes sense", I thought, since I
didn't tell it what the encoding was, and guessing the encoding is
tricky. Problem is, I can't figure out how to tell it what the
encoding is.
So I gave up on that and decided to take a look at the RTF handling
functions, since RTF seems to include information about what encoding
to use. But using 'setString' just gives me the raw RTF in the
NSTextView. So I tried using 'replaceCharactersInRangeWithRTF', but
alas, that just doesn't work at all, presumably due to the camelbones
bridge.
Now, finally, my questions ;-)
a) How can I explicitly tell the NSText object what encoding to use?
b) How can I shove RTF data into an NSText obj. using CB? (w/o using
the 'readRTFDFromFile' function).
c) Is there more detailed documentation on CB itself? All I can find
are short tutorials on the web.
Thanks for any help you can offer!
-Dan
- Re: Displaying japanese text in NSText Dan Mills
- Re: Displaying japanese text in NSText Sherm Pendley
- Re: Displaying japanese text in NSText Dan Mills
