Skip to content

Commit 78150f4

Browse files
committed
fix(cea): Fix some CEA-608 special characters.
The quotes in the Spanish/French character set should be the curly quotes, not the straight ASCII quotes. Also, the last entries in the Portuguese/German should be box-drawing characters; the dash and one of the vertical bar characters should match these to form contiguous boxes. Change-Id: I85bb09553ab770778dcf2a3fba759fc68fdf12db
1 parent c6efbd6 commit 78150f4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/cea/cea608_memory.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ shaka.cea.Cea608Memory.CharSet = {
458458
* @private @const {!Map<!number, !string>}
459459
*/
460460
shaka.cea.Cea608Memory.CharSet.BasicNorthAmericanChars = new Map([
461-
[0x2a, 'á'], [0x5c, 'é'], [0x5c, 'é'], [0x5e, 'í'], [0x5f, 'ó'], [0x60, 'ú'],
462-
[0x7b, 'ç'], [0x7c, '÷'], [0x7d, 'Ñ'], [0x7e, 'ñ'], [0x7f, '█'],
461+
[0x27, ''], [0x2a, 'á'], [0x5c, 'é'], [0x5c, 'é'], [0x5e, 'í'], [0x5f, 'ó'],
462+
[0x60, 'ú'], [0x7b, 'ç'], [0x7c, '÷'], [0x7d, 'Ñ'], [0x7e, 'ñ'], [0x7f, '█'],
463463
]);
464464

465465
/**
@@ -479,8 +479,8 @@ shaka.cea.Cea608Memory.CharSet.SpecialNorthAmericanChars = new Map([
479479
*/
480480
shaka.cea.Cea608Memory.CharSet.ExtendedSpanishFrench = new Map([
481481
[0x20, 'Á'], [0x21, 'É'], [0x22, 'Ó'], [0x23, 'Ú'], [0x24, 'Ü'], [0x25, 'ü'],
482-
[0x26, '´'], [0x27, '¡'], [0x28, '*'], [0x29, '\''], [0x2a, '-'], [0x2b, '©'],
483-
[0x2c, '℠'], [0x2d, '·'], [0x2e, '"'], [0x2f, '"'], [0x30, 'À'], [0x31, 'Â'],
482+
[0x26, ''], [0x27, '¡'], [0x28, '*'], [0x29, '\''], [0x2a, ''], [0x2b, '©'],
483+
[0x2c, '℠'], [0x2d, '·'], [0x2e, ''], [0x2f, ''], [0x30, 'À'], [0x31, 'Â'],
484484
[0x32, 'Ç'], [0x33, 'È'], [0x34, 'Ê'], [0x35, 'Ë'], [0x36, 'ë'], [0x37, 'Î'],
485485
[0x38, 'Ï'], [0x39, 'ï'], [0x3a, 'Ô'], [0x3b, 'Ù'], [0x3c, 'ù'], [0x3d, 'Û'],
486486
[0x3e, '«'], [0x3f, '»'],
@@ -494,7 +494,7 @@ shaka.cea.Cea608Memory.CharSet.ExtendedPortugueseGerman = new Map([
494494
[0x20, 'Ã'], [0x21, 'ã'], [0x22, 'Í'], [0x23, 'Ì'], [0x24, 'ì'], [0x25, 'Ò'],
495495
[0x26, 'ò'], [0x27, 'Õ'], [0x28, 'õ'], [0x29, '{'], [0x2a, '}'], [0x2b, '\\'],
496496
[0x2c, '^'], [0x2d, '_'], [0x2e, '|'], [0x2f, '~'], [0x30, 'Ä'], [0x31, 'ä'],
497-
[0x32, 'Ö'], [0x33, 'ö'], [0x34, 'ß'], [0x35, '¥'], [0x36, '¤'], [0x37, '¦'],
498-
[0x38, 'Å'], [0x39, 'å'], [0x3a, 'Ø'], [0x3b, 'ø'], [0x3c, '+'], [0x3d, '+'],
499-
[0x3e, '+'], [0x3f, '+'],
497+
[0x32, 'Ö'], [0x33, 'ö'], [0x34, 'ß'], [0x35, '¥'], [0x36, '¤'], [0x37, ''],
498+
[0x38, 'Å'], [0x39, 'å'], [0x3a, 'Ø'], [0x3b, 'ø'], [0x3c, ''], [0x3d, ''],
499+
[0x3e, ''], [0x3f, ''],
500500
]);

test/cea/cea608_memory_unit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('Cea608Memory', () => {
4646
it('adds and emits a series of special characters from the buffer', () => {
4747
const startTime = 1;
4848
const endTime = 2;
49-
const expectedText = '½¿èôÇ©ë»ö{ߦ';
49+
const expectedText = '½¿èôÇ©ë»ö{ß';
5050
const charGroups = [
5151
{
5252
set: CharSet.SPECIAL_NORTH_AMERICAN,

0 commit comments

Comments
 (0)