51 routines :

*AppleScriptsVanilla*
ascii_to_HTML
Average
Calculator
Calendar
Count_item
cut_text
days_week
EAN13
Encrypt-Decrypt
FactPremier
French_Vanilla_Dotted_Date
French_Vanilla_Dotted_Date2
Hexa_to_Bin
Last_month
list_erase
list_insert
list_replace
ListeDiviseurs
ListePremiers
Minuscule
NombreLong
NombreLong2
NomExtension
num_item
num_month
num_month2
num_week
number_format
number_format2
Paques
PGCD
PGCD2
reverse_string
Roman_to_Arab
round_decimal
search_email
search_replace
search_URL
SepNbre
SepNbre2
snip_text
stat
TauxPermut
TauxTransform
the_left
the_right
TriBulle
TriLineaire
week_and_year
XOR
ZeroDouble

ascii_to_HTML

Syntaxe

ascii_to_HTML(the_text)
Convertit un texte du format ASCII au format HTML.
Le paramètre et le résultat sont au format texte.

Exemple

ascii_to_HTML("Père-Noël")
---> "Père-Noël"

Script

on ascii_to_HTML(the_text)
set HTML_string to ""
set ascii_string to " ààââääèèééêêëëççùôôîîïïææ©®£&§<>±÷¬°¡¿ø«»¬ "
set HTML_list to {"nbsp", "agrave", "Agrave", "acirc", "Acirc", "auml", "Auml", "egrave", "Egrave", "eacute", "Eacute", "ecirc", "Ecirc", ¬
"euml", "Euml", "ccedil", "Ccedil", "ugrave", "ocirc", "Ocirc", "icirc", "Icirc", "iuml", "Iuml", "aelig", "AElig", ¬
"copy", "reg", "pound", "amp", "sect", "lt", "gt", "plusmn", "divide", "not", "deg", "iexcl", "iquest", "oslash", ¬
"laquo", "raquo", "euro"}
repeat with the_char from 1 to count of the_text
if character the_char of the_text is return then
set HTML_string to HTML_string & "<BR>"
else if character the_char of the_text is in ascii_string then
set HTML_string to HTML_string & ("&" & item ((offset of (character the_char of the_text) in ascii_string)) of HTML_list & ";")
else
set HTML_string to HTML_string & (character the_char of the_text)
end if
end repeat
return HTML_string
end ascii_to_HTML

Remarque

Cette routine a permis l'édition des pages de ce site importées à partir d'une pile HyperCard.

Site scripté avec HyperCard ©1987-1998 Apple Computer, Inc.
Mise à jour le 19/01/10 à 08:45:57