in reply to perl in the stars
Since considering your OP ("... replace [...] with [...] ...") I've seen your "Edit:" (just 10 minutes ago). It's a pity that whoever sent you "direct comments", didn't actually post those comments here: the issue could have been discussed. As I said in my reply, "Using <pre> ... and <tt> ... is absolutely fine for non-ASCII text." — this has been standard practice for many years.
Thanks for making the effort to provide a fix. Unfortunately, the autogenerated links still exist in the original, and the new additions are pretty much unreadable due to the plethora of &#nnnn; entities.
I took the two blocks of "c-tags" text, and ran them through a quick-and-dirty script that I threw together to convert them to what the two, original <pre> blocks should have looked like.
#!/usr/bin/env perl use strict; use warnings; my $c1 = <<'C1'; Pronunciation /ˈbɛtəldʒuːz, ˈbiː +;təl-, -dʒuːs/[1][2] Right ascension 05h 55m 10.30536s[3] Declination +07° 24′ 25.4304″[3] Apparent magnitude (V) +0.50[4] (0.0–1.6[5]) Characteristics Evolutionary stage Red supergiant Spectral type M1–M2 Ia–ab[6] Apparent magnitude (J) −3.00[7] Apparent magnitude (K) −4.05[7] U−B color index +2.06[4] B−V color index +1.85[4] Variable type SRc[8] Absolute magnitude (MV) −5.85[12] C1 my $c2 = <<'C2'; fritz@laptop:~/Documents$ trans :ru betelgeuse -p betelgeuse бетельгейз +е (betel'geyze) Translations of betelgeuse [ English -> Русский ] betelgeuse бетельгей +079;е, Бетел&# 1100;гейзе fritz@laptop:~/Documents$ C2 my %c2pre = ('[' => '[', ']' => ']'); for my $c ($c1, $c2) { $c =~ s/([\[\]])/$c2pre{$1}/eg; print "<pre>\n$c</pre>\n"; print '-' x 60, "\n"; }
Here's the output:
<pre> Pronunciation /ˈbɛtəldʒuːz, ˈbiː +;təl-, -dʒuːs/[1][2] Right ascension 05h 55m 10.30536s[3] Declination +07° 24′ 25.4304″[3] Apparent magnitude (V) +0.50[4] (0.0–1.6[5]) Characteristics Evolutionary stage Red supergiant Spectral type M1–M2 Ia–ab[6] Apparent magnitude (J) −3.00[7] Apparent magnitude (K) −4.05[7] U−B color index +2.06[4] B−V color index +1.85[4] Variable type SRc[8] Absolute magnitude (MV) −5.85[12] </pre> ------------------------------------------------------------ <pre> fritz@laptop:~/Documents$ trans :ru betelgeuse -p betelgeuse бетельгейз +е (betel'geyze) Translations of betelgeuse [ English -> Русский 	 +3; betelgeuse бетельгей +079;е, Бетельге +йзе fritz@laptop:~/Documents$ </pre> ------------------------------------------------------------
Before wrapping that output in <code>...</code>, I ran a "Preview": both <pre> blocks look fine, with the autogenerated links no longer there, and the Russian translation appearing in Cyrillic.
Please replace your two, original <pre> blocks with those above, and remove the two "Same data with c-tags: ..." sections. That should fix up everything and we can get rid of the consideration. Thankyou.
— Ken