Problem with foreign characters: some work (äöüßĐØ), some not (ČĈĐĎŸ) [RStudio+knitr+XeLaTex] ...

Does a Draconic Bloodline sorcerer's doubled proficiency bonus for Charisma checks against dragons apply to all dragon types or only the chosen one?

Does Prince Arnaud cause someone holding the Princess to lose?

Processing ADC conversion result: DMA vs Processor Registers

Raising a bilingual kid. When should we introduce the majority language?

What were wait-states, and why was it only an issue for PCs?

"Working on a knee"

Co-worker works way more than he should

When speaking, how do you change your mind mid-sentence?

Is there a possibility to generate a list dynamically in Latex?

A journey... into the MIND

Will I lose my paid in full property

Is Bran literally the world's memory?

When I export an AI 300x60 art board it saves with bigger dimensions

What is a good proxy for government quality?

Why did Israel vote against lifting the American embargo on Cuba?

How long can a nation maintain a technological edge over the rest of the world?

Has a Nobel Peace laureate ever been accused of war crimes?

Determinant of a matrix with 2 equal rows

How was Lagrange appointed professor of mathematics so early?

Where/What are Arya's scars from?

What does the black goddess statue do and what is it?

Is a self contained air-bullet cartridge feasible?

TV series episode where humans nuke aliens before decrypting their message that states they come in peace

Can gravitational waves pass through a black hole?



Problem with foreign characters: some work (äöüßĐØ), some not (ČĈĐĎŸ) [RStudio+knitr+XeLaTex]



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraLaTeX figure cross reference label using RStudio and knitrknitr in RStudio produces 'Undefined control sequence', alongside other issuesEpstopdf package not working with XeLaTeX in knitr ONLYknitR, XeLaTeX and tikz in RStudio: fails to compileXeLaTeX and Polyglossia doesn't work anymoreGetting TeXstudio+knitr to recognize regional charactersAPA references in Knitr with RStudioCan’t yet set up knitr with TeXShopTeX capacity exceeded using KnitrHow to insert references and bibliography into a .Rnw file produce with RStudio R Sweave and knitr?












3















I want to print some foreign characters in my final PDF produced with
RStudio (0.99) + *.Rnw-File with knitr + XeLaTex (via Miktex).



While using XeLaTex and polyglossia I can manage that all foreign characters are print properly in the PDF, if I pass it directly to the Tex-environment of the *.Rnw-File.



If I use the Cat("...")-function to print text in the PDF within a R-chunk, it fails in some characters ("1."), in others not ("2....").



I use utf8 enconding in the RStudio settings which obviously works well inside Tex-environment. But why does the cat-expression inside the R-chunk dont like the same characters?



What can I do to use cat("...") expression (I frequently used) also for the foreign characters?



MWE:



documentclass[utf8, a4paper]{article} % with/without [utf8] does not change anything 
% !Rnw weave = knitr
% !TeX program = XeLaTeX
usepackage{polyglossia}
setmainlanguage[]{english}
usepackage{fontspec}

begin{document}
Directly passed in tex environment:
1. äöüßĐØ
2. ČĈĐĎŸ

<<echo=FALSE, results = 'asis'>>=
cat("Within a R-Knitr-Junk: \newline")
cat("1. äöüßĐØ ~")
cat("2. ČĈĐĎŸ")
@
end{document}


PDF-Result:



enter image description here



Checking the tex-file produced by RSTudio (using Notepad++ with utf8 support) the line inside the R-chunk looks like:



enter image description here



OS: Win7/64Bit, RStudio 0.99 , R 3.2.5, MikTex 2.9.5900










share|improve this question
















bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    This is a question about the R cat function, not about TeX.

    – Thruston
    Apr 26 '17 at 7:28











  • Thanks to your suggestion I have checked with the RStudio console and cat("ČĈĐĎŸ") and print("ČĈĐĎŸ") both produce "CCÐDŸ" out of the box. This differs to the above posted example only in the "Ÿ" which is missing above. Until no I could not find a soluten to properly print these signs inside the console. You suggest to post it to another forum, right (which?)?

    – therob
    Apr 26 '17 at 8:34













  • With RStudio in Linux this MWE print all the characters correctly as is. Check twice that you saved the file with encoding utf8 in RStudio using the menu File > Save with Encoding ... > UTF-8 (System default).

    – Fran
    Dec 25 '18 at 16:44


















3















I want to print some foreign characters in my final PDF produced with
RStudio (0.99) + *.Rnw-File with knitr + XeLaTex (via Miktex).



While using XeLaTex and polyglossia I can manage that all foreign characters are print properly in the PDF, if I pass it directly to the Tex-environment of the *.Rnw-File.



If I use the Cat("...")-function to print text in the PDF within a R-chunk, it fails in some characters ("1."), in others not ("2....").



I use utf8 enconding in the RStudio settings which obviously works well inside Tex-environment. But why does the cat-expression inside the R-chunk dont like the same characters?



What can I do to use cat("...") expression (I frequently used) also for the foreign characters?



MWE:



documentclass[utf8, a4paper]{article} % with/without [utf8] does not change anything 
% !Rnw weave = knitr
% !TeX program = XeLaTeX
usepackage{polyglossia}
setmainlanguage[]{english}
usepackage{fontspec}

begin{document}
Directly passed in tex environment:
1. äöüßĐØ
2. ČĈĐĎŸ

<<echo=FALSE, results = 'asis'>>=
cat("Within a R-Knitr-Junk: \newline")
cat("1. äöüßĐØ ~")
cat("2. ČĈĐĎŸ")
@
end{document}


PDF-Result:



enter image description here



Checking the tex-file produced by RSTudio (using Notepad++ with utf8 support) the line inside the R-chunk looks like:



enter image description here



OS: Win7/64Bit, RStudio 0.99 , R 3.2.5, MikTex 2.9.5900










share|improve this question
















bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    This is a question about the R cat function, not about TeX.

    – Thruston
    Apr 26 '17 at 7:28











  • Thanks to your suggestion I have checked with the RStudio console and cat("ČĈĐĎŸ") and print("ČĈĐĎŸ") both produce "CCÐDŸ" out of the box. This differs to the above posted example only in the "Ÿ" which is missing above. Until no I could not find a soluten to properly print these signs inside the console. You suggest to post it to another forum, right (which?)?

    – therob
    Apr 26 '17 at 8:34













  • With RStudio in Linux this MWE print all the characters correctly as is. Check twice that you saved the file with encoding utf8 in RStudio using the menu File > Save with Encoding ... > UTF-8 (System default).

    – Fran
    Dec 25 '18 at 16:44
















3












3








3








I want to print some foreign characters in my final PDF produced with
RStudio (0.99) + *.Rnw-File with knitr + XeLaTex (via Miktex).



While using XeLaTex and polyglossia I can manage that all foreign characters are print properly in the PDF, if I pass it directly to the Tex-environment of the *.Rnw-File.



If I use the Cat("...")-function to print text in the PDF within a R-chunk, it fails in some characters ("1."), in others not ("2....").



I use utf8 enconding in the RStudio settings which obviously works well inside Tex-environment. But why does the cat-expression inside the R-chunk dont like the same characters?



What can I do to use cat("...") expression (I frequently used) also for the foreign characters?



MWE:



documentclass[utf8, a4paper]{article} % with/without [utf8] does not change anything 
% !Rnw weave = knitr
% !TeX program = XeLaTeX
usepackage{polyglossia}
setmainlanguage[]{english}
usepackage{fontspec}

begin{document}
Directly passed in tex environment:
1. äöüßĐØ
2. ČĈĐĎŸ

<<echo=FALSE, results = 'asis'>>=
cat("Within a R-Knitr-Junk: \newline")
cat("1. äöüßĐØ ~")
cat("2. ČĈĐĎŸ")
@
end{document}


PDF-Result:



enter image description here



Checking the tex-file produced by RSTudio (using Notepad++ with utf8 support) the line inside the R-chunk looks like:



enter image description here



OS: Win7/64Bit, RStudio 0.99 , R 3.2.5, MikTex 2.9.5900










share|improve this question
















I want to print some foreign characters in my final PDF produced with
RStudio (0.99) + *.Rnw-File with knitr + XeLaTex (via Miktex).



While using XeLaTex and polyglossia I can manage that all foreign characters are print properly in the PDF, if I pass it directly to the Tex-environment of the *.Rnw-File.



If I use the Cat("...")-function to print text in the PDF within a R-chunk, it fails in some characters ("1."), in others not ("2....").



I use utf8 enconding in the RStudio settings which obviously works well inside Tex-environment. But why does the cat-expression inside the R-chunk dont like the same characters?



What can I do to use cat("...") expression (I frequently used) also for the foreign characters?



MWE:



documentclass[utf8, a4paper]{article} % with/without [utf8] does not change anything 
% !Rnw weave = knitr
% !TeX program = XeLaTeX
usepackage{polyglossia}
setmainlanguage[]{english}
usepackage{fontspec}

begin{document}
Directly passed in tex environment:
1. äöüßĐØ
2. ČĈĐĎŸ

<<echo=FALSE, results = 'asis'>>=
cat("Within a R-Knitr-Junk: \newline")
cat("1. äöüßĐØ ~")
cat("2. ČĈĐĎŸ")
@
end{document}


PDF-Result:



enter image description here



Checking the tex-file produced by RSTudio (using Notepad++ with utf8 support) the line inside the R-chunk looks like:



enter image description here



OS: Win7/64Bit, RStudio 0.99 , R 3.2.5, MikTex 2.9.5900







xetex knitr rstudio






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 3 '17 at 13:00







therob

















asked Apr 26 '17 at 7:08









therobtherob

162




162





bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    This is a question about the R cat function, not about TeX.

    – Thruston
    Apr 26 '17 at 7:28











  • Thanks to your suggestion I have checked with the RStudio console and cat("ČĈĐĎŸ") and print("ČĈĐĎŸ") both produce "CCÐDŸ" out of the box. This differs to the above posted example only in the "Ÿ" which is missing above. Until no I could not find a soluten to properly print these signs inside the console. You suggest to post it to another forum, right (which?)?

    – therob
    Apr 26 '17 at 8:34













  • With RStudio in Linux this MWE print all the characters correctly as is. Check twice that you saved the file with encoding utf8 in RStudio using the menu File > Save with Encoding ... > UTF-8 (System default).

    – Fran
    Dec 25 '18 at 16:44
















  • 1





    This is a question about the R cat function, not about TeX.

    – Thruston
    Apr 26 '17 at 7:28











  • Thanks to your suggestion I have checked with the RStudio console and cat("ČĈĐĎŸ") and print("ČĈĐĎŸ") both produce "CCÐDŸ" out of the box. This differs to the above posted example only in the "Ÿ" which is missing above. Until no I could not find a soluten to properly print these signs inside the console. You suggest to post it to another forum, right (which?)?

    – therob
    Apr 26 '17 at 8:34













  • With RStudio in Linux this MWE print all the characters correctly as is. Check twice that you saved the file with encoding utf8 in RStudio using the menu File > Save with Encoding ... > UTF-8 (System default).

    – Fran
    Dec 25 '18 at 16:44










1




1





This is a question about the R cat function, not about TeX.

– Thruston
Apr 26 '17 at 7:28





This is a question about the R cat function, not about TeX.

– Thruston
Apr 26 '17 at 7:28













Thanks to your suggestion I have checked with the RStudio console and cat("ČĈĐĎŸ") and print("ČĈĐĎŸ") both produce "CCÐDŸ" out of the box. This differs to the above posted example only in the "Ÿ" which is missing above. Until no I could not find a soluten to properly print these signs inside the console. You suggest to post it to another forum, right (which?)?

– therob
Apr 26 '17 at 8:34







Thanks to your suggestion I have checked with the RStudio console and cat("ČĈĐĎŸ") and print("ČĈĐĎŸ") both produce "CCÐDŸ" out of the box. This differs to the above posted example only in the "Ÿ" which is missing above. Until no I could not find a soluten to properly print these signs inside the console. You suggest to post it to another forum, right (which?)?

– therob
Apr 26 '17 at 8:34















With RStudio in Linux this MWE print all the characters correctly as is. Check twice that you saved the file with encoding utf8 in RStudio using the menu File > Save with Encoding ... > UTF-8 (System default).

– Fran
Dec 25 '18 at 16:44







With RStudio in Linux this MWE print all the characters correctly as is. Check twice that you saved the file with encoding utf8 in RStudio using the menu File > Save with Encoding ... > UTF-8 (System default).

– Fran
Dec 25 '18 at 16:44












1 Answer
1






active

oldest

votes


















0














It may be related with the font you're system is using to output the code, it is generally another font than the one for the normal text. It is also dependent from your system, so you may have to follow these two steps



What happen if you add this line to your latex preamble after usepackage{fontspec}?



usepackage{libertine}


And you may have to use special escape unicode character in your R code, it is more robust. That is for example ß



cat("u00DF")
# ß


and the easiest way to do that is to use stringi::stri_escape_unicode()



stringi::stri_escape_unicode("ČĈĐĎŸ")
# u010cu0108u0110u010eu0178


See https://stackoverflow.com/questions/29265172/print-unicode-character-string-in-r






share|improve this answer


























  • Thanks for you hints. - Did I get it right: you suggests to use "u00DF" instead of "ß" etc? Not very practical as I have to care about all foreign characters manually (by find&replace).... - I would prefer that this can be done "automatic" .... as I have also no problems with german umlauts äöüß --> why no way for croatian characters?

    – therob
    Apr 27 '17 at 8:26











  • - Meanwhile I did some other progress - but still not perfect: 1.) I followed r-bloggers.com/r-and-foreign-characters and using now inside the R-chunk (or in the R-console while debugging) --> Sys.setlocale("LC_CTYPE", "croatian") <- 2.) Now most of the croatian characters are drawn correctly, but not all. Any other advice with this approach? 3.) using "pdf.options(encoding = 'ISOLatin2') # or utf8, latin1..." did not bring any improvement

    – therob
    Apr 27 '17 at 8:28











  • @therob Did you try usepackage{libertine}? Can you edit your answer to add your OS+version of programm/Package. It works fiine on my debian 9

    – nebi
    Apr 27 '17 at 15:27













  • Update: after using sys.setlocale("..") (see above comment) most, but not all characters I mentioned are displayed properly. Funny thing is, that with the same source code all characters worked properly, after using another PC (Windows8.1) in croatia. Maybe there is any croatian package/characterset/keyboardlayout installed, which was not the case in my german test-PC before? I could not figure out why it worked, but it did without further measures from my side....strange...

    – therob
    May 15 '17 at 12:03












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f366729%2fproblem-with-foreign-characters-some-work-%25c3%25a4%25c3%25b6%25c3%25bc%25c3%259f%25c4%2590%25c3%2598-some-not-%25c4%258c%25c4%2588%25c4%2590%25c4%258e%25c5%25b8-rstudiok%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














It may be related with the font you're system is using to output the code, it is generally another font than the one for the normal text. It is also dependent from your system, so you may have to follow these two steps



What happen if you add this line to your latex preamble after usepackage{fontspec}?



usepackage{libertine}


And you may have to use special escape unicode character in your R code, it is more robust. That is for example ß



cat("u00DF")
# ß


and the easiest way to do that is to use stringi::stri_escape_unicode()



stringi::stri_escape_unicode("ČĈĐĎŸ")
# u010cu0108u0110u010eu0178


See https://stackoverflow.com/questions/29265172/print-unicode-character-string-in-r






share|improve this answer


























  • Thanks for you hints. - Did I get it right: you suggests to use "u00DF" instead of "ß" etc? Not very practical as I have to care about all foreign characters manually (by find&replace).... - I would prefer that this can be done "automatic" .... as I have also no problems with german umlauts äöüß --> why no way for croatian characters?

    – therob
    Apr 27 '17 at 8:26











  • - Meanwhile I did some other progress - but still not perfect: 1.) I followed r-bloggers.com/r-and-foreign-characters and using now inside the R-chunk (or in the R-console while debugging) --> Sys.setlocale("LC_CTYPE", "croatian") <- 2.) Now most of the croatian characters are drawn correctly, but not all. Any other advice with this approach? 3.) using "pdf.options(encoding = 'ISOLatin2') # or utf8, latin1..." did not bring any improvement

    – therob
    Apr 27 '17 at 8:28











  • @therob Did you try usepackage{libertine}? Can you edit your answer to add your OS+version of programm/Package. It works fiine on my debian 9

    – nebi
    Apr 27 '17 at 15:27













  • Update: after using sys.setlocale("..") (see above comment) most, but not all characters I mentioned are displayed properly. Funny thing is, that with the same source code all characters worked properly, after using another PC (Windows8.1) in croatia. Maybe there is any croatian package/characterset/keyboardlayout installed, which was not the case in my german test-PC before? I could not figure out why it worked, but it did without further measures from my side....strange...

    – therob
    May 15 '17 at 12:03
















0














It may be related with the font you're system is using to output the code, it is generally another font than the one for the normal text. It is also dependent from your system, so you may have to follow these two steps



What happen if you add this line to your latex preamble after usepackage{fontspec}?



usepackage{libertine}


And you may have to use special escape unicode character in your R code, it is more robust. That is for example ß



cat("u00DF")
# ß


and the easiest way to do that is to use stringi::stri_escape_unicode()



stringi::stri_escape_unicode("ČĈĐĎŸ")
# u010cu0108u0110u010eu0178


See https://stackoverflow.com/questions/29265172/print-unicode-character-string-in-r






share|improve this answer


























  • Thanks for you hints. - Did I get it right: you suggests to use "u00DF" instead of "ß" etc? Not very practical as I have to care about all foreign characters manually (by find&replace).... - I would prefer that this can be done "automatic" .... as I have also no problems with german umlauts äöüß --> why no way for croatian characters?

    – therob
    Apr 27 '17 at 8:26











  • - Meanwhile I did some other progress - but still not perfect: 1.) I followed r-bloggers.com/r-and-foreign-characters and using now inside the R-chunk (or in the R-console while debugging) --> Sys.setlocale("LC_CTYPE", "croatian") <- 2.) Now most of the croatian characters are drawn correctly, but not all. Any other advice with this approach? 3.) using "pdf.options(encoding = 'ISOLatin2') # or utf8, latin1..." did not bring any improvement

    – therob
    Apr 27 '17 at 8:28











  • @therob Did you try usepackage{libertine}? Can you edit your answer to add your OS+version of programm/Package. It works fiine on my debian 9

    – nebi
    Apr 27 '17 at 15:27













  • Update: after using sys.setlocale("..") (see above comment) most, but not all characters I mentioned are displayed properly. Funny thing is, that with the same source code all characters worked properly, after using another PC (Windows8.1) in croatia. Maybe there is any croatian package/characterset/keyboardlayout installed, which was not the case in my german test-PC before? I could not figure out why it worked, but it did without further measures from my side....strange...

    – therob
    May 15 '17 at 12:03














0












0








0







It may be related with the font you're system is using to output the code, it is generally another font than the one for the normal text. It is also dependent from your system, so you may have to follow these two steps



What happen if you add this line to your latex preamble after usepackage{fontspec}?



usepackage{libertine}


And you may have to use special escape unicode character in your R code, it is more robust. That is for example ß



cat("u00DF")
# ß


and the easiest way to do that is to use stringi::stri_escape_unicode()



stringi::stri_escape_unicode("ČĈĐĎŸ")
# u010cu0108u0110u010eu0178


See https://stackoverflow.com/questions/29265172/print-unicode-character-string-in-r






share|improve this answer















It may be related with the font you're system is using to output the code, it is generally another font than the one for the normal text. It is also dependent from your system, so you may have to follow these two steps



What happen if you add this line to your latex preamble after usepackage{fontspec}?



usepackage{libertine}


And you may have to use special escape unicode character in your R code, it is more robust. That is for example ß



cat("u00DF")
# ß


and the easiest way to do that is to use stringi::stri_escape_unicode()



stringi::stri_escape_unicode("ČĈĐĎŸ")
# u010cu0108u0110u010eu0178


See https://stackoverflow.com/questions/29265172/print-unicode-character-string-in-r







share|improve this answer














share|improve this answer



share|improve this answer








edited May 23 '17 at 12:39









Community

1




1










answered Apr 26 '17 at 20:09









nebinebi

39519




39519













  • Thanks for you hints. - Did I get it right: you suggests to use "u00DF" instead of "ß" etc? Not very practical as I have to care about all foreign characters manually (by find&replace).... - I would prefer that this can be done "automatic" .... as I have also no problems with german umlauts äöüß --> why no way for croatian characters?

    – therob
    Apr 27 '17 at 8:26











  • - Meanwhile I did some other progress - but still not perfect: 1.) I followed r-bloggers.com/r-and-foreign-characters and using now inside the R-chunk (or in the R-console while debugging) --> Sys.setlocale("LC_CTYPE", "croatian") <- 2.) Now most of the croatian characters are drawn correctly, but not all. Any other advice with this approach? 3.) using "pdf.options(encoding = 'ISOLatin2') # or utf8, latin1..." did not bring any improvement

    – therob
    Apr 27 '17 at 8:28











  • @therob Did you try usepackage{libertine}? Can you edit your answer to add your OS+version of programm/Package. It works fiine on my debian 9

    – nebi
    Apr 27 '17 at 15:27













  • Update: after using sys.setlocale("..") (see above comment) most, but not all characters I mentioned are displayed properly. Funny thing is, that with the same source code all characters worked properly, after using another PC (Windows8.1) in croatia. Maybe there is any croatian package/characterset/keyboardlayout installed, which was not the case in my german test-PC before? I could not figure out why it worked, but it did without further measures from my side....strange...

    – therob
    May 15 '17 at 12:03



















  • Thanks for you hints. - Did I get it right: you suggests to use "u00DF" instead of "ß" etc? Not very practical as I have to care about all foreign characters manually (by find&replace).... - I would prefer that this can be done "automatic" .... as I have also no problems with german umlauts äöüß --> why no way for croatian characters?

    – therob
    Apr 27 '17 at 8:26











  • - Meanwhile I did some other progress - but still not perfect: 1.) I followed r-bloggers.com/r-and-foreign-characters and using now inside the R-chunk (or in the R-console while debugging) --> Sys.setlocale("LC_CTYPE", "croatian") <- 2.) Now most of the croatian characters are drawn correctly, but not all. Any other advice with this approach? 3.) using "pdf.options(encoding = 'ISOLatin2') # or utf8, latin1..." did not bring any improvement

    – therob
    Apr 27 '17 at 8:28











  • @therob Did you try usepackage{libertine}? Can you edit your answer to add your OS+version of programm/Package. It works fiine on my debian 9

    – nebi
    Apr 27 '17 at 15:27













  • Update: after using sys.setlocale("..") (see above comment) most, but not all characters I mentioned are displayed properly. Funny thing is, that with the same source code all characters worked properly, after using another PC (Windows8.1) in croatia. Maybe there is any croatian package/characterset/keyboardlayout installed, which was not the case in my german test-PC before? I could not figure out why it worked, but it did without further measures from my side....strange...

    – therob
    May 15 '17 at 12:03

















Thanks for you hints. - Did I get it right: you suggests to use "u00DF" instead of "ß" etc? Not very practical as I have to care about all foreign characters manually (by find&replace).... - I would prefer that this can be done "automatic" .... as I have also no problems with german umlauts äöüß --> why no way for croatian characters?

– therob
Apr 27 '17 at 8:26





Thanks for you hints. - Did I get it right: you suggests to use "u00DF" instead of "ß" etc? Not very practical as I have to care about all foreign characters manually (by find&replace).... - I would prefer that this can be done "automatic" .... as I have also no problems with german umlauts äöüß --> why no way for croatian characters?

– therob
Apr 27 '17 at 8:26













- Meanwhile I did some other progress - but still not perfect: 1.) I followed r-bloggers.com/r-and-foreign-characters and using now inside the R-chunk (or in the R-console while debugging) --> Sys.setlocale("LC_CTYPE", "croatian") <- 2.) Now most of the croatian characters are drawn correctly, but not all. Any other advice with this approach? 3.) using "pdf.options(encoding = 'ISOLatin2') # or utf8, latin1..." did not bring any improvement

– therob
Apr 27 '17 at 8:28





- Meanwhile I did some other progress - but still not perfect: 1.) I followed r-bloggers.com/r-and-foreign-characters and using now inside the R-chunk (or in the R-console while debugging) --> Sys.setlocale("LC_CTYPE", "croatian") <- 2.) Now most of the croatian characters are drawn correctly, but not all. Any other advice with this approach? 3.) using "pdf.options(encoding = 'ISOLatin2') # or utf8, latin1..." did not bring any improvement

– therob
Apr 27 '17 at 8:28













@therob Did you try usepackage{libertine}? Can you edit your answer to add your OS+version of programm/Package. It works fiine on my debian 9

– nebi
Apr 27 '17 at 15:27







@therob Did you try usepackage{libertine}? Can you edit your answer to add your OS+version of programm/Package. It works fiine on my debian 9

– nebi
Apr 27 '17 at 15:27















Update: after using sys.setlocale("..") (see above comment) most, but not all characters I mentioned are displayed properly. Funny thing is, that with the same source code all characters worked properly, after using another PC (Windows8.1) in croatia. Maybe there is any croatian package/characterset/keyboardlayout installed, which was not the case in my german test-PC before? I could not figure out why it worked, but it did without further measures from my side....strange...

– therob
May 15 '17 at 12:03





Update: after using sys.setlocale("..") (see above comment) most, but not all characters I mentioned are displayed properly. Funny thing is, that with the same source code all characters worked properly, after using another PC (Windows8.1) in croatia. Maybe there is any croatian package/characterset/keyboardlayout installed, which was not the case in my german test-PC before? I could not figure out why it worked, but it did without further measures from my side....strange...

– therob
May 15 '17 at 12:03


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f366729%2fproblem-with-foreign-characters-some-work-%25c3%25a4%25c3%25b6%25c3%25bc%25c3%259f%25c4%2590%25c3%2598-some-not-%25c4%258c%25c4%2588%25c4%2590%25c4%258e%25c5%25b8-rstudiok%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

Castillo d'Acher Características Menú de navegación

Connecting two nodes from the same mother node horizontallyTikZ: What EXACTLY does the the |- notation for...