@@ -130,8 +130,7 @@ describe('Cea708Service', () => {
130
130
expect ( captions ) . toEqual ( expectedCaptions ) ;
131
131
} ) ;
132
132
133
-
134
- it ( 'decodes multibyte unstyled caption text' , ( ) => {
133
+ it ( 'decodes multibyte unstyled caption text (Korean)' , ( ) => {
135
134
const controlCodes = [
136
135
...defineWindow ,
137
136
// Series of C0 control codes that add multi-byte text.
@@ -159,6 +158,34 @@ describe('Cea708Service', () => {
159
158
expect ( captions ) . toEqual ( expectedCaptions ) ;
160
159
} ) ;
161
160
161
+ it ( 'decodes multibyte unstyled caption text (Polish)' , ( ) => {
162
+ const controlCodes = [
163
+ ...defineWindow ,
164
+ // Series of C0 control codes that add multi-byte text.
165
+ 0x18 , 0x01 , 0x7c , 0xF3 , 0x18 , 0x01 , 0x42 , 0x18 , 0x01 , 0x07 , // ż, ó, ł, ć
166
+ ] ;
167
+
168
+ const packet1 = createCea708PacketFromBytes ( controlCodes , startTime ) ;
169
+ const packet2 = createCea708PacketFromBytes ( hideWindow , endTime ) ;
170
+
171
+ const text = 'żółć' ; // cspell:ignore żółć
172
+ const topLevelCue = CeaUtils . createWindowedCue ( startTime , endTime , '' ,
173
+ serviceNumber , windowId , rowCount , colCount , anchorId ) ;
174
+ topLevelCue . nestedCues = [
175
+ CeaUtils . createDefaultCue ( startTime , endTime , /* payload= */ text ) ,
176
+ ] ;
177
+
178
+ const expectedCaptions = [
179
+ {
180
+ stream,
181
+ cue : topLevelCue ,
182
+ } ,
183
+ ] ;
184
+
185
+ const captions = getCaptionsFromPackets ( service , packet1 , packet2 ) ;
186
+ expect ( captions ) . toEqual ( expectedCaptions ) ;
187
+ } ) ;
188
+
162
189
it ( 'setPenLocation sets the pen location correctly' , ( ) => {
163
190
const controlCodes = [
164
191
...defineWindow ,
0 commit comments