evild
#1
I’m using PHP to save a tabbed text file that contains accented characters:
Example:
INGRÉDIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, ÉPICES À Æ Ç È É Ê Ë Î Ï Ô Û Ü
When I read from the file using Applescript, I get this:
INGR…DIENTS : VINAIGRE, EAU, GRAINES DE MOUTARDE, SEL, CURCUMA, …PICES ¿ ¬ ? « » … À Œ œ ‘ € ‹
PHP can’t save the text as a Mac OS Roman charset (like Filemaker Pro can). It defaults to iso-8859-1 (I can choose to save it as iso-8859-15).
Is there any way to open this file in Applescript so I can retain those accented characters?
julifos
#2
There are various ways. One of the easier ones is using the TEC osax:
TECConvertText "c·spita" fromCode "ISO-8859-1" toCode "macintosh" --> "cáspita"
Pick it here: http://www.osaxen.com/tec.html
evild
#3
Thanks, jj.
Can the TEC osax be used in OS 9? It’s hard to tell, every thing is is Japanese!
I do all my development in OSX, but it mostly gets put on OS 9 machines. So, any additions I use are ones available for both systems.
If not, what are some of the other (read: harder) ways of solving my problem?
D
EDIT: Nevermind, it seems to be working.
julifos
#4
Yes, it does exist even an old 68k version.