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

Does using the Inspiration rules for character defects encourage My Guy Syndrome?

How do I deal with an erroneously large refund?

false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'

Processing ADC conversion result: DMA vs Processor Registers

`FindRoot [ ]`::jsing: Encountered a singular Jacobian at a point...WHY

What's the difference between using dependency injection with a container and using a service locator?

What is the definining line between a helicopter and a drone a person can ride in?

Is Bran literally the world's memory?

Arriving in Atlanta after US Preclearance in Dublin. Will I go through TSA security in Atlanta to transfer to a connecting flight?

Like totally amazing interchangeable sister outfit accessory swapping or whatever

Where can I find how to tex symbols for different fonts?

Protagonist's race is hidden - should I reveal it?

Co-worker works way more than he should

How was Lagrange appointed professor of mathematics so early?

Writing a T-SQL stored procedure to receive 4 numbers and insert them into a table

What helicopter has the most rotor blades?

Where to find documentation for `whois` command options?

France's Public Holidays' Puzzle

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

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

Suing a Police Officer Instead of the Police Department

Does Prince Arnaud cause someone holding the Princess to lose?

Why does the Cisco show run command not show the full version, while the show version command does?

When does Bran Stark remember Jamie pushing him?



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 10 mins 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 10 mins 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 10 mins 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 10 mins 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

Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...