• 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: decoding arabic text broken
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: decoding arabic text broken


  • Subject: Re: decoding arabic text broken
  • From: Seth Delackner <email@hidden>
  • Date: Sun, 7 Aug 2005 15:49:07 +0000
  • Mail-followup-to: Aki Inoue <email@hidden>, email@hidden

On Thu, Aug 04, 2005 at 03:26:19PM -0700, Aki Inoue wrote:
> I cannot reproduce the issue at all.
>
> Please make sure the hex value returned from -characterAtIndex: is
> actually incorrect.
>
> The string attached to your message was very suspicious because they
> are in Arabic presentation forms.

(gdb) set $b = (unsigned char*)[rawText bytes]
(gdb) p/x (int)$b[1]
$20 = 0xdd
(gdb) p/x (int)$b[0]
$21 = 0xcd
(gdb) p/x (int)$b[1]
$22 = 0xdd
(gdb) p/x (int)$b[2]
$23 = 0xc9

Printing description of s:
\ufea3\u00f7\ufe93
(gdb) p/x (char)[s characterAtIndex: 0]
$28 = 0xa3
(gdb) p/x (char)[s characterAtIndex: 1]
$29 = 0xf7
(gdb) p/x (char)[s characterAtIndex: 2]
$30 = 0x93

(gdb) p/x (int)[s characterAtIndex: 0]
$32 = 0xfea3
(gdb) p/x (int)[s characterAtIndex: 1]
$33 = 0xf7
(gdb) p/x (int)[s characterAtIndex: 2]
$34 = 0xfe93

I don't know what that all means.

> >On Thu, Aug 04, 2005 at 11:35:33AM +0200, Annard Brouwer wrote:
> >
> >>On 4 Aug 2005, at 05:51, Seth Delackner wrote:
> >>
> >>>(gdb) call (void)NSLog(@"foo: %@", (id)[[NSString alloc]
> >>>initWithData: rawText encoding: v])
> >>>foo: ﺣ÷ﺓ
> >>>
> >>>For those in non-unicode mail readers, that is "an arabic
> >>>character, a division symbol, and an arabic character".
> >>>
> >>>Wha?
> >>>
> >>>
> >>
> >>To make sure that you can check what is being logged, I would use -
> >>writeToFile: o.s.s. and then check it out using TextEdit with
> >>probably the Unicode encoding. You can't rely on a console being
> >>correct to display these characters.
> >>
> >
> >My sample code there is just reduced for brevity.  The original bug
> >is from looking at the resulting string after having been inserted
> >into an NSTextStorage and displayed in an NSTextView, and is very
> >certainly arabic/mathdivision/arabic.
> > _______________________________________________
> >Do not post admin requests to the list. They will be ignored.
> >Cocoa-dev mailing list      (email@hidden)
> >Help/Unsubscribe/Update your Subscription:
> >
> >This email sent to email@hidden
> >
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: decoding arabic text broken
      • From: Aki Inoue <email@hidden>
References: 
 >Re: decoding arabic text broken (From: Seth Delackner <email@hidden>)
 >Re: decoding arabic text broken (From: Aki Inoue <email@hidden>)

  • Prev by Date: Re: Codec type from QTMovie/QTMedia/QTTrack
  • Next by Date: drag-removing nsstatusitems from menubar
  • Previous by thread: Re: decoding arabic text broken
  • Next by thread: Re: decoding arabic text broken
  • Index(es):
    • Date
    • Thread