• 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: Convert PC ANSI to Mac Standard Roman
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert PC ANSI to Mac Standard Roman


  • Subject: Re: Convert PC ANSI to Mac Standard Roman
  • From: Peter Waibel <email@hidden>
  • Date: Thu, 17 Aug 2006 18:49:58 +0200



Hi David,

I think you have one ore more unvisible character before your text.

I tried the following and got the same result you described in your previous mail.
(A red sign in the box)



set myText to (ASCII character 12) & "xxx yyy zzz"
tell application "QuarkXPress65"
tell document 1
tell page 1
set textBoxRef to (make text box at beginning with properties {name:"Test Description", bounds:{0, 40, 40, 90}, runaround:{0, 0, 0, 0}})
tell textBoxRef
tell text 1
set contents to myText
end tell
end tell
end tell
end tell
end tell


So I remembered that databases often use a "vertical tab" (ASCII character 12) as a marker in text fields.
Maybe you must strip the first character of your text.



Cheers Yvan,

It works fine apart from when I put it the converted text into Quark.

I have put in some display dialogs in, before and after the encoding and they are showing what I'm expecting, in that, before the encoding the bullet points, TM, etc are not there, then after encoding they are there.

However when I put the converted text into a text box in Quark at first glance it doesn't display. Then I spotted the small red box with a cross through it at the bottom left hand corner of the text box. So if I put my cursor at the beginning of the box and press delete the first bullet point appears, then I press my right arrow and press delete the space between the bullet point and the first letter shows, and then after delete and the right arrow are pressed I get the first letter and so on. I hope this is clear.

Even if you extent the text box to the bottom of the page the text does not appear, however I know it is there. Has anyone got any clues as to why this would happen.

My code as it is now:

display dialog strCatDesc_General

tell application "Cyclone"
set inputEncoding to Win_ANSI --Win_ANSI Unicode
set destEncoding to Mac_Roman
set convertedData to (convert text strCatDesc_General from inputEncoding to destEncoding)
end tell

display dialog convertedData

tell application "QuarkXPress"
tell document 1
tell page iPage
make text box at beginning with properties {name:{"Test Description"}, bounds:{0, 40, 40, 90}, runaround:{0, 0, 0, 0}}
make new text at beginning of text box ("Test Description") with properties {contents:convertedData, size:8, font:"Helvetica Light"}
end tell
end tell
end tell


Here below is a screen shot of my Quark document, on the left is the text box where I pop the converted text and on the right is the unconverted text

<pastedGraphic.png>

Cheers in advance for any help

David Bradley
Senior Web Programmer
Globe Media
Brookfields Way
Manvers
Wath upon Dearne
Rotherham
S63 5DL

Tel: 01709 768000
Fax: 01709 768011
email@hidden
www.globe-media.com




On 16 Aug 2006, at 13:31, Yvan KOENIG wrote:

Hello

Your encodings are wrongly defined.

use:

tell application "Cyclone"
try
set inputEncoding to Win_ANSI
set destEncoding to Mac_Roman
set convertedData to (convert text original from inputEncoding to destEncoding)
on error number the error_number
error "Cyclone conversion error." & return & "Error code: " & (error_number as text)
end try
end tell



Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
40globe-media.com


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
40opix.de


This email sent to email@hidden


Grüße aus Berlin

Peter Waibel


-------------------------------- Opix AG Peter Waibel Am Borsigturm 46 13507 Berlin

Fon: +49 30 4303 4421
Fax: +49 30 4303 4409

email@hidden

email@hidden
email@hidden
http://www.opix.de
--------------------------------



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Convert PC ANSI to Mac Standard Roman
      • From: Bastiaan Boertien <email@hidden>
References: 
 >Convert PC ANSI to Mac Standard Roman (From: David Bradley <email@hidden>)
 >Re: Convert PC ANSI to Mac Standard Roman (From: Yvan KOENIG <email@hidden>)
 >Re: Convert PC ANSI to Mac Standard Roman (From: David Bradley <email@hidden>)

  • Prev by Date: Re: Convert PC ANSI to Mac Standard Roman
  • Next by Date: Re: using AS to format the text of Apple Mail message
  • Previous by thread: Re: Convert PC ANSI to Mac Standard Roman
  • Next by thread: Re: Convert PC ANSI to Mac Standard Roman
  • Index(es):
    • Date
    • Thread