Character Encoding Problem with ReadList
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I have a .srt file (subtitle file) with the following text:
Chapitre 1 : Systèmes d'équations linéaires et matrices
However when I import it into Mathematica, using:
subRip = ReadList[subRibFile, String];
I get:
Chapitre 1 : SystÃÂèmes d'ÃÂéquations linÃÂéaires et matrices
How can I avoid that ?
import string-manipulation
add a comment |Â
up vote
2
down vote
favorite
I have a .srt file (subtitle file) with the following text:
Chapitre 1 : Systèmes d'équations linéaires et matrices
However when I import it into Mathematica, using:
subRip = ReadList[subRibFile, String];
I get:
Chapitre 1 : SystÃÂèmes d'ÃÂéquations linÃÂéaires et matrices
How can I avoid that ?
import string-manipulation
What do you get if you doImport[ subRibFile, "Text"]
?
â Jason B.
yesterday
@JasonB. Thanks for your comment. In that case, I get one string which is not seperated by lines... but the output is correctly decoded. :)
â james
yesterday
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I have a .srt file (subtitle file) with the following text:
Chapitre 1 : Systèmes d'équations linéaires et matrices
However when I import it into Mathematica, using:
subRip = ReadList[subRibFile, String];
I get:
Chapitre 1 : SystÃÂèmes d'ÃÂéquations linÃÂéaires et matrices
How can I avoid that ?
import string-manipulation
I have a .srt file (subtitle file) with the following text:
Chapitre 1 : Systèmes d'équations linéaires et matrices
However when I import it into Mathematica, using:
subRip = ReadList[subRibFile, String];
I get:
Chapitre 1 : SystÃÂèmes d'ÃÂéquations linÃÂéaires et matrices
How can I avoid that ?
import string-manipulation
import string-manipulation
asked yesterday
james
845418
845418
What do you get if you doImport[ subRibFile, "Text"]
?
â Jason B.
yesterday
@JasonB. Thanks for your comment. In that case, I get one string which is not seperated by lines... but the output is correctly decoded. :)
â james
yesterday
add a comment |Â
What do you get if you doImport[ subRibFile, "Text"]
?
â Jason B.
yesterday
@JasonB. Thanks for your comment. In that case, I get one string which is not seperated by lines... but the output is correctly decoded. :)
â james
yesterday
What do you get if you do
Import[ subRibFile, "Text"]
?â Jason B.
yesterday
What do you get if you do
Import[ subRibFile, "Text"]
?â Jason B.
yesterday
@JasonB. Thanks for your comment. In that case, I get one string which is not seperated by lines... but the output is correctly decoded. :)
â james
yesterday
@JasonB. Thanks for your comment. In that case, I get one string which is not seperated by lines... but the output is correctly decoded. :)
â james
yesterday
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
This is a bit of a workaround, using "import" but it works !
subRipIm = Import[subRibFile, "Text", CharacterEncoding -> "UTF8"];
subRip = DeleteCases[StringSplit[ToString[subRipIm], "n"], ""];
Thanks a lot ! This works ! :)
â james
yesterday
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
This is a bit of a workaround, using "import" but it works !
subRipIm = Import[subRibFile, "Text", CharacterEncoding -> "UTF8"];
subRip = DeleteCases[StringSplit[ToString[subRipIm], "n"], ""];
Thanks a lot ! This works ! :)
â james
yesterday
add a comment |Â
up vote
2
down vote
accepted
This is a bit of a workaround, using "import" but it works !
subRipIm = Import[subRibFile, "Text", CharacterEncoding -> "UTF8"];
subRip = DeleteCases[StringSplit[ToString[subRipIm], "n"], ""];
Thanks a lot ! This works ! :)
â james
yesterday
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
This is a bit of a workaround, using "import" but it works !
subRipIm = Import[subRibFile, "Text", CharacterEncoding -> "UTF8"];
subRip = DeleteCases[StringSplit[ToString[subRipIm], "n"], ""];
This is a bit of a workaround, using "import" but it works !
subRipIm = Import[subRibFile, "Text", CharacterEncoding -> "UTF8"];
subRip = DeleteCases[StringSplit[ToString[subRipIm], "n"], ""];
answered yesterday
henry
1,250423
1,250423
Thanks a lot ! This works ! :)
â james
yesterday
add a comment |Â
Thanks a lot ! This works ! :)
â james
yesterday
Thanks a lot ! This works ! :)
â james
yesterday
Thanks a lot ! This works ! :)
â james
yesterday
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f183290%2fcharacter-encoding-problem-with-readlist%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What do you get if you do
Import[ subRibFile, "Text"]
?â Jason B.
yesterday
@JasonB. Thanks for your comment. In that case, I get one string which is not seperated by lines... but the output is correctly decoded. :)
â james
yesterday