View Single Post
  #3 (permalink)  
Vecchio 04-21-2012, 12:16 AM
marco marco non è in linea
Senior Member
 
Registrato dal: Jun 2007
Messaggi: 810
predefinito

Eccomi qui: non è stato facile ma alla fine, grazie anche al tuo aiuto ce l'ho fatta.
Mi sono prima di tutto costruito una tabella di conversione caratteri, pescando e rielaborando i dati trovati qua e la su internet, che riassumo qui sotto:

CHARHTML NumberUTF-8HTML NameDescription
""""Double quotes (or speech marks)
### Number
$$$ Dollar
%%% Procenttecken
&&&&Ampersand
''' Single quote
((( Open parenthesis (or open bracket)
))) Close parenthesis (or close bracket)
*** Asterisk
+++ Plus
,,, Comma
--- Hyphen
... Period, dot or full stop
/// Slash or divide
000 Zero
111 One
222 Two
333 Three
444 Four
555 Five
666 Six
777 Seven
888 Eight
999 Nine
::: Colon
;&#59;; Semicolon
<&#60;<&lt;Less than (or open angled bracket)
=&#61;= Equals
>&#62;>&gt;Greater than (or close angled bracket)
?&#63;? Question mark
@&#64;@ At symbol
A&#65;A Uppercase A
B&#66;B Uppercase B
C&#67;C Uppercase C
D&#68;D Uppercase D
E&#69;E Uppercase E
F&#70;F Uppercase F
G&#71;G Uppercase G
H&#72;H Uppercase H
I&#73;I Uppercase I
J&#74;J Uppercase J
K&#75;K Uppercase K
L&#76;L Uppercase L
M&#77;M Uppercase M
N&#78;N Uppercase N
O&#79;O Uppercase O
P&#80;P Uppercase P
Q&#81;Q Uppercase Q
R&#82;R Uppercase R
S&#83;S Uppercase S
T&#84;T Uppercase T
U&#85;U Uppercase U
V&#86;V Uppercase V
W&#87;W Uppercase W
X&#88;X Uppercase X
Y&#89;Y Uppercase Y
Z&#90;Z Uppercase Z
[&#91;[ Opening bracket
\&#92;\ Backslash
]&#93;] Closing bracket
^&#94;^ Caret - circumflex
_&#95;_ Underscore
`&#96;` Grave accent
a&#97;a Lowercase a
b&#98;b Lowercase b
c&#99;c Lowercase c
d&#100;d Lowercase d
e&#101;e Lowercase e
f&#102;f Lowercase f
g&#103;g Lowercase g
h&#104;h Lowercase h
i&#105;i Lowercase i
j&#106;j Lowercase j
k&#107;k Lowercase k
l&#108;l Lowercase l
m&#109;m Lowercase m
n&#110;n Lowercase n
o&#111;o Lowercase o
p&#112;p Lowercase p
q&#113;q Lowercase q
r&#114;r Lowercase r
s&#115;s Lowercase s
t&#116;t Lowercase t
u&#117;u Lowercase u
v&#118;v Lowercase v
w&#119;w Lowercase w
x&#120;x Lowercase x
y&#121;y Lowercase y
z&#122;z Lowercase z
{&#123;{ Opening brace
|&#124;| Vertical bar
}&#125;} Closing brace
~&#126;~ Equivalency sign - tilde
n/a&#127;  Delete
€&#128;&euro;Euro sign
‚&#130;&sbquo;Single low-9 quotation mark
Æ’&#131;ƒ&fnof;Latin small letter f with hook
„&#132;&bdquo;Double low-9 quotation mark
…&#133;&hellip;Horizontal ellipsis
†&#134;&dagger;Dagger
‡&#135;&Dagger;Double dagger
ˆ&#136;ˆ&circ;Modifier letter circumflex accent
‰&#137;&permil;Per mille sign
Å &#138;Š&Scaron;Latin capital letter S with caron
‹&#139;&lsaquo;Single left-pointing angle quotation
Å’&#140;Œ&OElig;Latin capital ligature OE
Ž&#142;Ž Latin captial letter Z with caron
‘&#145;&lsquo;Left single quotation mark
’&#146;&rsquo;Right single quotation mark
“&#147;&ldquo;Left double quotation mark
â€&#148;&rdquo;Right double quotation mark
•&#149;&bull;Bullet
–&#150;&ndash;En dash
—&#151;&mdash;Em dash
Ëœ&#152;˜&tilde;Small tilde
â„¢&#153;&trade;Trade mark sign
Å¡&#154;š&scaron;Latin small letter S with caron
›&#155;&rsaquo;Single right-pointing angle quotation mark
Å“&#156;œ&oelig;Latin small ligature oe
ž&#158;žžLatin small letter z with caron
Ÿ&#159;Ÿ&yuml;Latin capital letter Y with diaeresis
¡&#160;¡&iexcl;Inverted exclamation mark
¢&#161;¢&cent;Cent sign
£&#163;£&pound;Pound sign
¤&#164;¤&curren;Currency sign
Â¥&#165;¥&yen;Yen sign
¦&#166;¦&brvbar;Pipe, Broken vertical bar
§&#167;§&sect;Section sign
¨&#168;¨&uml;Spacing diaeresis - umlaut
©&#169;©&copy;Copyright sign
ª&#170;ª&ordf;Feminine ordinal indicator
«&#171;«&laquo;Left double angle quotes
¬&#172;¬&not;Not sign
­&#173;­­Soft hyphen
®&#174;®&reg;Registered trade mark sign
¯&#175;¯&macr;Spacing macron - overline
°&#176;°&deg;Degree sign
±&#177;±&plusmn;Plus-or-minus sign
²&#178;²²Superscript two - squared
³&#179;³³Superscript three - cubed
´&#180;´&acute;Acute accent - spacing acute
µ&#181;µ&micro;Micro sign
¶&#182;&para;Pilcrow sign - paragraph sign
•&#183;&middot;Middle dot - Georgian comma
¸&#184;¸&cedil;Spacing cedilla
¹&#185;¹¹Superscript one
º&#186;º&ordm;Masculine ordinal indicator
»&#187;»&raquo;Right double angle quotes
¼&#188;¼¼Fraction one quarter
½&#189;½½Fraction one half
¾&#190;¾¾Fraction three quarters
¿&#191;¿&iquest;Inverted question mark
À&#192;À&Agrave;Latin capital letter A with grave
Ã&#193;Á&Aacute;Latin capital letter A with acute
Â&#194;Â&Acirc;Latin capital letter A with circumflex
Ã&#195;Ã&Atilde;Latin capital letter A with tilde
Ä&#196;Ä&Auml;Latin capital letter A with diaeresis
Ã…&#197;Å&Aring;Latin capital letter A with ring above
Æ&#198;Æ&AElig;Latin capital letter AE
Ç&#199;Ç&Ccedil;Latin capital letter C with cedilla
È&#200;È&Egrave;Latin capital letter E with grave
É&#201;É&Eacute;Latin capital letter E with acute
Ê&#202;Ê&Ecirc;Latin capital letter E with circumflex
Ë&#203;Ë&Euml;Latin capital letter E with diaeresis
ÃŒ&#204;Ì&Igrave;Latin capital letter I with grave
Ã&#205;Í&Iacute;Latin capital letter I with acute
ÃŽ&#206;Î&Icirc;Latin capital letter I with circumflex
Ã&#207;Ï&Iuml;Latin capital letter I with diaeresis
Ã&#208;Ð&ETH;Latin capital letter ETH
Ñ&#209;Ñ&Ntilde;Latin capital letter N with tilde
Ã’&#210;Ò&Ograve;Latin capital letter O with grave
Ó&#211;Ó&Oacute;Latin capital letter O with acute
Ô&#212;Ô&Ocirc;Latin capital letter O with circumflex
Õ&#213;Õ&Otilde;Latin capital letter O with tilde
Ö&#214;Ö&Ouml;Latin capital letter O with diaeresis
×&#215;×&times;Multiplication sign
Ø&#216;Ø&Oslash;Latin capital letter O with slash
Ù&#217;Ù&Ugrave;Latin capital letter U with grave
Ú&#218;Ú&Uacute;Latin capital letter U with acute
Û&#219;Û&Ucirc;Latin capital letter U with circumflex
Ãœ&#220;Ü&Uuml;Latin capital letter U with diaeresis
Ã&#221;Ý&Yacute;Latin capital letter Y with acute
Þ&#222;Þ&THORN;Latin capital letter THORN
ß&#223;ß&szlig;Latin small letter sharp s - ess-zed
à &#224;à&agrave;Latin small letter a with grave
á&#225;á&aacute;Latin small letter a with acute
â&#226;â&acirc;Latin small letter a with circumflex
ã&#227;ã&atilde;Latin small letter a with tilde
ä&#228;ä&auml;Latin small letter a with diaeresis
Ã¥&#229;å&aring;Latin small letter a with ring above
æ&#230;æ&aelig;Latin small letter ae
ç&#231;ç&ccedil;Latin small letter c with cedilla
è&#232;è&egrave;Latin small letter e with grave
é&#233;é&eacute;Latin small letter e with acute
ê&#234;ê&ecirc;Latin small letter e with circumflex
ë&#235;ë&euml;Latin small letter e with diaeresis
ì&#236;ì&igrave;Latin small letter i with grave
í&#237;í&iacute;Latin small letter i with acute
î&#238;î&icirc;Latin small letter i with circumflex
ï&#239;ï&iuml;Latin small letter i with diaeresis
ð&#240;ð&eth;Latin small letter eth
ñ&#241;ñ&ntilde;Latin small letter n with tilde
ò&#242;ò&ograve;Latin small letter o with grave
ó&#243;ó&oacute;Latin small letter o with acute
ô&#244;ô&ocirc;Latin small letter o with circumflex
õ&#245;õ&otilde;Latin small letter o with tilde
ö&#246;ö&ouml;Latin small letter o with diaeresis
Õ&#247;÷&divide;Division sign
ø&#248;ø&oslash;Latin small letter o with slash
ù&#249;ù&ugrave;Latin small letter u with grave
ú&#250;ú&uacute;Latin small letter u with acute
û&#251;û&ucirc;Latin small letter u with circumflex
ü&#252;ü&uuml;Latin small letter u with diaeresis
ý&#253;ý&yacute;Latin small letter y with acute
þ&#254;þ&thorn;Latin small letter thorn
ÿ&#255;ÿ&yuml;Latin small letter y with diaeresis

Sembrava fatta, ed invece no perchè il database che dovevo aggiustare aveva probabilmente già subito in passato vari passaggi di server con charset sbagliati e correzioni manuali non del tutto corrette, quindi vi erano sovrapposizioni di caratteri speciali, concatenazioni in pratica che facevano si che un carattere potesse essere composto da due simboli, da quattro.. fino anche ad arrivare a diciassette simboli!
La mossa corretta sarebbe quella quindi di cominciare a sostituire col Notepad2 i caratteri con più simboli per poi andare a correggere quelli con meno simboli (perché il piccolo può stare nel grande ma non viceversa, errore che forse era stato fatto da chi aveva corretto precedentemente).
Non esiste uno standard in questo, perché tutto sta agli errori di conversione che sono stati commessi prima, ma io sono partito col cercare il  (con tanto di virgola finale): ne guardavo un po’ e prendevo la stringa più lunga che trovavo e cercavo di interpretarne la conversione originale aiutandomi anche con la tabella scritta prima. Poi quando ormai li avevo sostituiti tutti ho cominciato anche a cercare il à ed alla fine di caratteri strani ne sono rimasti veramente pochi. Mano a mano che li sostituivo me li annotavo così che la prossima volta che dovesse capitarmi un casino simile, forse risolverei più facilmente.
Vi riporto quindi qui sotto la tabella finale dei caratteri che ho sostituito, da prendere un po’ con le molle perché qualche dubbio che siano tutti corretti al 100% ce l’ho avuto, in particolare sul carattere 133 (quello dei tre puntini di fila).
Ho riordinato la tabella di modo che per ogni carattere, compare per primo quello che contiene più simboli, per evitare appunto problemi di concatenazione.

CHARHTML NumberUTF-8HTML NameDescription
â€â€Å&#128;&euro;Euro sign
€&#128;&euro;Euro sign
€&#128;&euro;Euro sign
…&#133;&hellip;Horizontal ellipsis
â€ÂÂ&#133;&hellip;Horizontal ellipsis
…&#133;&hellip;Horizontal ellipsis
‘&#147;&ldquo;Left double quotation mark
“&#152;˜&tilde;Small tilde
Ä“&#156;œ&oelig;Latin small ligature oe
ž&#158;žžLatin small letter z with caron
£&#163;£&pound;Pound sign
£&#163;£&pound;Pound sign
Â¥&#165;¥&yen;Yen sign
§&#167;§&sect;Section sign
©&#169;©&copy;Copyright sign
ª&#170;ª&ordf;Feminine ordinal indicator
«&#171;«&laquo;Left double angle quotes
®&#174;®&reg;Registered trade mark sign
°&#176;°&deg;Degree sign
ç°&#176;°&deg;Degree sign
°&#176;°&deg;Degree sign
²&#178;²²Superscript two - squared
’&#180;´&acute;Acute accent - spacing acute
´&#180;´&acute;Acute accent - spacing acute
’&#180;´&acute;Acute accent - spacing acute
´&#180;´&acute;Acute accent - spacing acute
•&#183;&middot;Middle dot - Georgian comma
Õ&#183;&middot;Middle dot - Georgian comma
º&#186;º&ordm;Masculine ordinal indicator
»&#187;»&raquo;Right double angle quotes
¿&#191;¿&iquest;Inverted question mark
À&#192;À&Agrave;Latin capital letter A with grave
ÃÂÂ&#192;À&Agrave;Latin capital letter A with grave
À&#192;À&Agrave;Latin capital letter A with grave
È&#200;È&Egrave;Latin capital letter E with grave
É&#201;É&Eacute;Latin capital letter E with acute
É&#201;É&Eacute;Latin capital letter E with acute
ÃŒ&#204;Ì&Igrave;Latin capital letter I with grave
Ñ&#209;Ñ&Ntilde;Latin capital letter N with tilde
Ã’&#210;Ò&Ograve;Latin capital letter O with grave
Ó&#210;Ò&Ograve;Latin capital letter O with grave
Ö&#211;Ó&Oacute;Latin capital letter O with acute
Ù&#217;Ù&Ugrave;Latin capital letter U with grave
ÃŒ&#217;Ù&Ugrave;Latin capital letter U with grave
Ú&#217;Ù&Ugrave;Latin capital letter U with grave
Ã’&#217;Ù&Ugrave;Latin capital letter U with grave
ßß&#223;ß&szlig;Latin small letter sharp s - ess-zed
ß&#223;ß&szlig;Latin small letter sharp s - ess-zed
à &#224;à&agrave;Latin small letter a with grave
à&#224;à&agrave;Latin small letter a with grave
a\' &#224;à&agrave;Latin small letter a with grave
à &#224;à&agrave;Latin small letter a with grave
à&#224;à&agrave;Latin small letter a with grave
à &#224;à&agrave;Latin small letter a with grave
¡&#225;á&aacute;Latin small letter a with acute
á&#225;á&aacute;Latin small letter a with acute
á&#225;á&aacute;Latin small letter a with acute
â&#226;â&acirc;Latin small letter a with circumflex
ä&#228;ä&auml;Latin small letter a with diaeresis
ç&#231;ç&ccedil;Latin small letter c with cedilla
ç&#231;ç&ccedil;Latin small letter c with cedilla
¨&#232;è&egrave;Latin small letter e with grave
È&#232;è&egrave;Latin small letter e with grave
è&#232;è&egrave;Latin small letter e with grave
Ãe\'&#232;è&egrave;Latin small letter e with grave
è&#232;è&egrave;Latin small letter e with grave
é&#233;é&eacute;Latin small letter e with acute
é&#233;é&eacute;Latin small letter e with acute
ê&#234;ê&ecirc;Latin small letter e with circumflex
ê&#234;ê&ecirc;Latin small letter e with circumflex
♫&#235;ë&euml;Latin small letter e with diaeresis
ë&#235;ë&euml;Latin small letter e with diaeresis
ì&#236;ì&igrave;Latin small letter i with grave
ì&#236;ì&igrave;Latin small letter i with grave
í&#237;í&iacute;Latin small letter i with acute
í&#237;í&iacute;Latin small letter i with acute
î&#238;î&icirc;Latin small letter i with circumflex
î&#238;î&icirc;Latin small letter i with circumflex
ñ&#241;ñ&ntilde;Latin small letter n with tilde
ñ&#241;ñ&ntilde;Latin small letter n with tilde
ò&#242;ò&ograve;Latin small letter o with grave
ò&#242;ò&ograve;Latin small letter o with grave
ó&#243;ó&oacute;Latin small letter o with acute
ó&#243;ó&oacute;Latin small letter o with acute
ô&#244;ô&ocirc;Latin small letter o with circumflex
ö&#246;ö&ouml;Latin small letter o with diaeresis
ö&#246;ö&ouml;Latin small letter o with diaeresis
ø&#248;ø&oslash;Latin small letter o with slash
ù&#249;ù&ugrave;Latin small letter u with grave
ù&#249;ù&ugrave;Latin small letter u with grave
ú&#250;ú&uacute;Latin small letter u with acute
ú&#250;ú&uacute;Latin small letter u with acute
û&#251;û&ucirc;Latin small letter u with circumflex
ü&#252;ü&uuml;Latin small letter u with diaeresis
ü&#252;ü&uuml;Latin small letter u with diaeresis
ï¿&#255;ÿ&yuml;Latin small letter y with diaeresis

Sperando che questo lavoro possa essere d’aiuto a qualcun altro in futuro, vi saluto e mi rendo disponibile per eventuali delucidazioni in merito, nel caso fosse necessario.
Ciao
Rispondi quotando