Re: Strange char "?" in html source from Safari
Re: Strange char "?" in html source from Safari
- Subject: Re: Strange char "?" in html source from Safari
- From: has <email@hidden>
- Date: Wed, 25 Jul 2007 16:51:22 +0100
Marco Trotta wrote:
i'm an applescript user. i'm having a trouble with html source from
safari i've wrote a script in order to identify and copy text from
html
source.
but there is a trouble with source coming from this kind of site:
http://www.lastampa.it/redazione/cmsSezioni/economia/200707articoli/
24000girata.asp
When i try to get text from html, the "'" become "?"
Example
tell application "Safari" to copy (source of front document) to
testo
set dadove to (matchPos of (find text "<div
class='articologirata'>" in
testo)) + 29
set findove to matchPos of (find text "</div>" in testo starting
at dadove)
set body to (extract string testo from dadove to findove)
Didn't see the problem here, but at a guess you're using the Satimage
osax which isn't Unicode-aware, so any characters that can't be
represented in your system's primary encoding are converted to "?"
instead. Try using a Unicode-aware alternative, e.g. TextCommands
<http://osaxen.com/files/textcommands1.1.2.html>, and see if that
fixes the problem.
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden