• 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: Trouble with Unicode text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with Unicode text


  • Subject: Re: Trouble with Unicode text
  • From: John Delacour <email@hidden>
  • Date: Thu, 27 Feb 2003 01:26:03 +0000

On Wednesday, February 26, 2003, at 11:32 pm, Jeffrey Mattox wrote:

Sometimes, the string contains Greek characters, e.g.,  (sigma, Option-w).

Strictly speaking that character ( &sum; or &#x2211; ) is not Greek and not Sigma but

* Character Name: N-ARY SUMMATION
* Block: Mathematical Operators

Greek capital letter sigma is &#x0343; by the way.


When I get the input string via the text field, a sigma looks like:

log(theChar) -- "\\u2211"
log((class of theChar) as string) -- "Unicode text"
log(length of theChar) -- 1

That's the character in UTF-16 -- it's a single character but two bytes.

set theChar to "" as string
log(theChar) -- "\\u201a\\340\\353"
log((class of theChar) as string) -- "string"
log(length of theChar) -- 3

That's the UTF-8 encoding of the character, namely

option-shift-0 + small a with grave accent + small e with diaeresis

JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Trouble with Unicode text
      • From: Jeffrey Mattox <email@hidden>
References: 
 >Trouble with Unicode text (From: Jeffrey Mattox <email@hidden>)

  • Prev by Date: Re: I need more power, Scotty
  • Next by Date: Re: Trouble with Unicode text
  • Previous by thread: Trouble with Unicode text
  • Next by thread: Re: Trouble with Unicode text
  • Index(es):
    • Date
    • Thread