Hi,
On Thu, Sep 6, 2012 at 3:45 PM, Nikita <[email protected]> wrote:
> Hello
>
> Is it any way to call Obj-C constructor like this?
>
> NSString* token = [[NSString alloc] initWithData:deviceToken
> encoding:NSUTF8StringEncoding];
>
> NSString.FromData(deviceToken, NSStringEncoding.UTF8) seems to produce
> undesired result.
>
Do you have a small test case showing how this produces undesired results?
I have tried the following:
var str = NSString.FromData (NSData.FromString ("abcñáéíó",
NSStringEncoding.UTF8), NSStringEncoding.UTF8);
Console.WriteLine (str.ToString ());
Console.WriteLine ("abcñáéíó");
and both Console.WriteLines produce the same output (the accented
characters are garbled in both cases, but that's a different issue).
Rolf
>
>
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Calling-Obj-C-constructor-tp4656882.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch