Skip to content
Browse files

Fixed mantis #3741: Spanish character "¿" is displayed as "Ù" in tele…

…text subtitles

- Copied decoding tables from TVPlugin's teletext decoder, which was correct.
- Did some minor reformat of the tables to be more readable.
  • Loading branch information...
1 parent 1367f5c commit 226bf304c5a7bddddb64d09d7eab251a3d6fd139 @arion-p arion-p committed May 11, 2012
Showing with 13 additions and 15 deletions.
  1. +13 −15 mediaportal/Core/Player/TeletextSubtitles/TextConversion.cs
View
28 mediaportal/Core/Player/TeletextSubtitles/TextConversion.cs
@@ -74,33 +74,31 @@ public static string ConvertLineLangSpecific(string lang, string line)
private static char[,] m_charTableA = new char[,]
{
{'#', '\u016F'}, {'\u00A3', '$'},
- {'#', '\u00F5'}, {'\u00E9', '\u00EF'}, {'#', '$'}, {'\u00A3', '$'},
- {'#', '$'},
- {'#', '\u0149'}, {'\u00E7', '$'}, {'#', '\u00A4'}, {'#', '\u00CB'},
- {'#', '\u00A4'},
- {'\u00A3', '\u011F'}
+ {'#', '\u00F5'}, {'\u00E9', '\u00EF'},
+ {'#', '$'}, {'\u00A3', '$'},
+ {'#', '$'}, {'#', '\u0149'},
+ {'\u00E7', '$'}, {'#', '\u00A4'},
+ {'#', '\u00CB'}, {'#', '\u00A4'},
+ {'\u00A3', '\u011F'}, {'#', '\u00A4'}
};
private static char[] m_charTableB = new char[]
{
- '\u010D', '@', '\u0160', '\u00E0', '\u00A7', '\u00E9', '\u0160', '\u0105',
- '\u00A1', '\u0162',
- '\u010C', '\u00C9', '\u0130'
+ '\u010D', '@', '\u0160', '\u00E0', '\u00A7', '\u00E9', '\u0160',
+ '\u0105', '\u00A1', '\u0162', '\u010C', '\u00C9', '\u0130', '\u00C9'
};
private static char[,] m_charTableC = new char[,]
{
{'\u0165', '\u017E', '\u00FD', '\u00ED', '\u0159', '\u00E9'},
{'\u2190', '\u00BD', '\u2192', '\u2191', '#', '\u0336'},
{'\u00C4', '\u00D6', '\u017D', '\u00DC', '\u00D5', '\u0161'},
- {'\u00EB', '\u00EA', '\u00F9', '\u00EE', '#', '\u00E8'}
- ,
+ {'\u00EB', '\u00EA', '\u00F9', '\u00EE', '#', '\u00E8'},
{'\u00C4', '\u00D6', '\u00DC', '^', '_', '\u00B0'},
- {'\u00B0', '\u00E7', '\u2192', '\u2191', '#', '\u00F9'}
- ,
+ {'\u00B0', '\u00E7', '\u2192', '\u2191', '#', '\u00F9'},
{'\u00E9', '\u0229', '\u017D', '\u010D', '\u016B', '\u0161'},
{'\u01B5', '\u015A', '\u0141', '\u0107', '\u00F3', '\u0119'},
- {'\u00E1', '\u00E9', '\u00ED', '\u00F3', '\u00FA', '\u00D9'},
+ {'\u00E1', '\u00E9', '\u00ED', '\u00F3', '\u00FA', '\u00BF'},
{'\u00C2', '\u015E', '\u01CD', '\u00CE', '\u0131', '\u0163'},
{'\u0106', '\u017D', '\u0110', '\u0160', '\u00EB', '\u010D'},
{'\u00C4', '\u00D6', '\u00C5', '\u00DC', '_', '\u00E9'},
@@ -329,7 +327,7 @@ public static char[] Convert(int languageCode, byte[] teletext)
chr2 = m_charTableE[chr - 0xED];
break;
default:
- chr2 = (char)chr;
+ chr2 = (char) chr;
break;
}
text[i] = chr2;
@@ -345,4 +343,4 @@ private static void assert(bool ok, string msg)
}
}
}
-}
+}

0 comments on commit 226bf30

Please sign in to comment.
Something went wrong with that request. Please try again.