[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSCharacterConversionException
From: |
Yen-Ju Chen |
Subject: |
Re: NSCharacterConversionException |
Date: |
Tue, 30 Jan 2007 15:25:47 +0800 |
On 1/30/07, Patrick <contact@pakl.at> wrote:
Hi folks!
I am using GNUstep in a C# project.
When I try to create an NSFont using a NSString that contains the following
string: 'MS P明朝' I get the following exception from the FontWithNameSize
method:
<NSException: 5fbe018> NAME:NSCharacterConversionException REASON:Can't get
cString from Unicode string.
I simply have no idea what I should do. Any ideas or hints would be much
appreciated!
Thanks in advance....
The name you saw is in Chinese, which cannot be converted into c strings.
I think there is a matching mechanism between the font name you put in
and font file name on the system.
It may depends on the backend (fontconfig for x11 or nfont for art backend).
Or an easy way to try is changing [NSString cString] to [NSString UTF8String]
somewhere in -gui or -back.
But there is another problem.
While font name is in Chinese, the file name of fonts may still in English
since some file systems do not support unicode.
So again, depending on the backend, you have to try and see.
Yen-Ju
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep