Skip to content

Commit

Permalink
handle escaped all chars like libass
Browse files Browse the repository at this point in the history
  • Loading branch information
odrling committed Aug 10, 2024
1 parent 852f653 commit fb6dca4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libdakara_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ int dakara_check_external_sub_file_for(char *filepath) {
return dakara_check_sub_file(sub_filepath);
}

#define NBSP '\xa0'

/*
* check events of the current track
*/
Expand Down Expand Up @@ -298,7 +300,15 @@ void dakara_check_subtitle_events(ASS_Track *track, dakara_check_sub_results *re
case 'N':
line[write_head++] = '\n';
break;
case 'h':
line[write_head++] = NBSP;
break;
case '{':
case '}':
line[write_head++] = line[read_head];
break;
default:
line[write_head++] = '\\';
line[write_head++] = line[read_head];
}
} else {
Expand Down

0 comments on commit fb6dca4

Please sign in to comment.