PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > web site to translate spanish characters into corresponding htmlcodes?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
web site to translate spanish characters into corresponding htmlcodes?

Réponse
 
LinkBack Outils de la discussion
Vieux 15/04/2008, 03h16   #1
laredotornado
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut web site to translate spanish characters into corresponding htmlcodes?

Hi,

I have certain blocks of Spanish text, for example

¿Necesita agregar una impresora o copiadora adicional a su forma
personalizada de orden? Presione aquí.

Don't know if the backwards question mark and the accented "i" came
through, but I was wondering if anyone knew of a site where I could
cut and paste the above and it would spit back the corresponding html
codes (e.g. {) for the appropriate Spanisn symbols.

Thanks for any advice, - Dave
  Réponse avec citation
Vieux 15/04/2008, 04h29   #2
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web site to translate spanish characters into corresponding html codes?

..oO(laredotornado)

>I have certain blocks of Spanish text, for example
>
>¿Necesita agregar una impresora o copiadora adicional a su forma
>personalizada de orden? Presione aquí.
>
>Don't know if the backwards question mark and the accented "i" came
>through, but I was wondering if anyone knew of a site where I could
>cut and paste the above and it would spit back the corresponding html
>codes (e.g. {) for the appropriate Spanisn symbols.


With UTF-8 you could write all those chars literarily without any
character references.

Micha
  Réponse avec citation
Vieux 15/04/2008, 20h15   #3
Dr J R Stockton
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web site to translate spanish characters into corresponding html codes?

In comp.infosystems.www.authoring.html message <a2cb0dce-8809-4123-bfd6-
4345d2a7a950@s13g2000prd.googlegroups.com>, Mon, 14 Apr 2008 19:16:05,
laredotornado <laredotornado@zipmail.com> posted:

>I have certain blocks of Spanish text, for example
>
>¿Necesita agregar una impresora o copiadora adicional a su forma
>personalizada de orden? Presione aquí.
>
>Don't know if the backwards question mark and the accented "i" came
>through, but I was wondering if anyone knew of a site where I could
>cut and paste the above and it would spit back the corresponding html
>codes (e.g. {) for the appropriate Spanisn symbols.


I see the inverted question mark, but no accents.

One could easily be written, e.g. by yourself. A TEXTAREA for input, a
BUTTON, a TEXTAREA for output, and a series of RegExps, acting on the
content of the first area and writing to the second.

DEMO : ake a copy of my <URL:http://www.merlyn.demon.co.uk/js-
quick.htm>; put ¿Que? in F.X0, F.X1.value = F.X0.value.replace(/¿/g,
"{") in the textarea, press Eval, and read F.X1. Then copy F.X1
to the textarea, press HTML, and observe that it's not { that you
need (it's ¿).

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk IE7 FF2 Op9 Sf3
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
  Réponse avec citation
Vieux 15/04/2008, 22h47   #4
Jukka K. Korpela
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web site to translate spanish characters into corresponding html codes?

Scripsit Michael Fesser:

> .oO(laredotornado)
>
>> I have certain blocks of Spanish text, for example
>>
>> ¿Necesita agregar una impresora o copiadora adicional a su forma
>> personalizada de orden? Presione aquí.
>>
>> Don't know if the backwards question mark and the accented "i" came
>> through, but I was wondering if anyone knew of a site where I could
>> cut and paste the above and it would spit back the corresponding html
>> codes (e.g. {) for the appropriate Spanisn symbols.

>
> With UTF-8 you could write all those chars literarily without any
> character references.


And with iso-8859-1, the common default (more or less), if you don't
mind having to do something special with curly quotation marks.

And you can load a Spanish keyboard setting, or the US International
keyboard setting, or (best of all) the Finnish multinational keyboard
setting, in order to be able to type the characters conveniently (e.g.,
using the AltGr key).

Of course, many of the common resources for iso-8859-1 contains the
references you can use, if that's really what you want. Even the HTML
specifications have them.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

  Réponse avec citation
Vieux 15/04/2008, 23h05   #5
Petr Vileta
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web site to translate spanish characters into corresponding html codes?

laredotornado wrote:
> Hi,
>
> I have certain blocks of Spanish text, for example
>
> ¿Necesita agregar una impresora o copiadora adicional a su forma
> personalizada de orden? Presione aquí.
>
> Don't know if the backwards question mark and the accented "i" came
> through, but I was wondering if anyone knew of a site where I could
> cut and paste the above and it would spit back the corresponding html
> codes (e.g. {) for the appropriate Spanisn symbols.
>
> Thanks for any advice, - Dave


Few years ago I wrote TEDU (freeware). Try it.
http://www.practisoft.cz/?download+en

--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

  Réponse avec citation
Vieux 16/04/2008, 03h03   #6
Scott Bryce
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web site to translate spanish characters into corresponding htmlcodes?

Dr J R Stockton wrote:
> One could easily be written, e.g. by yourself. A TEXTAREA for input,
> a BUTTON, a TEXTAREA for output, and a series of RegExps, acting on
> the content of the first area and writing to the second.


If you are going to go that route, write it in Perl and take advantage
of the HTML::Entities module. No need to write all those regexen.
  Réponse avec citation
Vieux 16/04/2008, 09h03   #7
Andreas Prilop
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web site to translate spanish characters into corresponding htmlcodes?

On Tue, 15 Apr 2008, Dr J R Stockton wrote:

>> Presione aquí.

>
> I see the inverted question mark, but no accents.


El acento está aquí.
^

--
http://niwo.mnsys.org/saved/~flavell/charset/
  Réponse avec citation
Vieux 16/04/2008, 15h29   #8
Dr J R Stockton
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: web site to translate spanish characters into corresponding htmlcodes?

On Apr 16, 3:03am, Scott Bryce <sbr...@scottbryce.com> wrote:
> Dr J R Stockton wrote:
>
> > One could easily be written, e.g. by yourself. A TEXTAREA for input,
> > a BUTTON, a TEXTAREA for output, and a series of RegExps, acting on
> > the content of the first area and writing to the second.

>
> If you are going to go that route, write it in Perl and take advantage
> of the HTML::Entities module. No need to write all those regexen.


Then do it yourself <g> .

IMHO, it's much easier to do it in JavaScript, the natural language
for the OP's request of a "site", than it would be to learn Perl. And
it turns out that there's no need to write RegExps as such, if one
provides an input area for the user to define the conversions.

The following includes self-test :

<form class=TRY action="#">
<textarea name=T0 cols=69 rows=4>
Replace first field by second field
¿ &amp;#191; Comment follows second TAB
q Q Paste new content into this box
</textarea>
<textarea name=T1 cols=69 rows=4>
Text input
¿que?</textarea>
<br><input type=button value="->" onClick="TextConv(this.form)"><br>
<textarea name=T2 cols=69 rows=4></textarea>
</form>


function TextConv(F) { var St, XX, J
XX = F.T0.value.split(/[\r\n]+/)
St = F.T1.value
for (J=0 ; J<XX.length ; J++) {
XX[J] = XX[J].split("\t")
if (XX[J].length==1) XX[J][1] = ""
XX[J][0] = new RegExp(XX[J][0], "g") }
for (J=0 ; J<XX.length ; J++) St = St.replace(XX[J][0], XX[J][1])
F.T2.value = St }


I did it in my js-misc1.htm#TS; but I'll not be leaving it there if
signs of excessive use appear - take a COPY. RSVP if bugs are found;
tested in IE7 FF2 Op9 Sf3. FF2 has a mini-bug : the testareas appear
to be 5 rows.


BTW, my newsreader did in fact show the accented í, about one pixel
different from a normal one at normal size, but good at 20 pt.

--
(c) John Stockton, near London, UK. Posting with Google.
Mail: J.R.""""""""@physics.org or (better) via Home Page at
Web: <URL:http://www.merlyn.demon.co.uk/>
FAQish topics, acronyms, links, etc.; Date, Delphi, JavaScript, ...
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 21h18.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13108 seconds with 16 queries