I have a text file. Get it here: https://ufile.io/iehon

It's frensh, a subscript file and there is a lot of math. When I import it in Mathematica using:

subRipIm = Import[subRibFile, "Text", CharacterEncoding -> "UTF8"];
subRip = DeleteCases[StringSplit[ToString[subRipIm], "\n"], ""];

... I can spot stuff like that:

enter image description here

How can I make sure that it is correctly imported ? Any help would be extremely appreciated !


closed as off-topic by Kuba Nov 12 '18 at 9:46

  • The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Works fine on 11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018). Don't see any bad encodings. $\endgroup$ – Rohit Namjoshi Oct 7 '18 at 15:19
  • $\begingroup$ @RohitNamjoshi Okay. Do you think that it is possible to convert the mathe sections of the text into Mathematica Mathe input ? I want to convert it to Latex in the end, but it does not work like that. $\endgroup$ – james Oct 7 '18 at 15:23
  • $\begingroup$ Remove the timing markers and numbers using DeleteCases[subRip, s_String /; StringMatchQ[ s, {StartOfString ~~ "00" ~~ ___ , StartOfString ~~ DigitCharacter ..}]]. Looks like the math parts are delimited by <i>...</i> e.g. <i>\[Alpha]ⱼ - \[Beta]ⱼ != 0.</i>. Which is valid Mathematica input. Other examples are not and I think would have to be manually converted. $\endgroup$ – Rohit Namjoshi Oct 7 '18 at 19:58
  • $\begingroup$ @RohitNamjoshi Many thanks for your helpful comment. I have started a new question. Maybe you can add your comment as an answer together with a bit of code of how to convert it... mathematica.stackexchange.com/questions/183310/… $\endgroup$ – james Oct 7 '18 at 20:14
  • $\begingroup$ I'm voting to close this question as off-topic because the problem could not be reproduced and the file is not longer available behind the link. $\endgroup$ – Kuba Nov 12 '18 at 9:46

Browse other questions tagged or ask your own question.