liao961120 / linguisticsdown

Easy Linguistics Document Writing with R Markdown
https://liao961120.github.io/linguisticsdown
Other
26 stars 3 forks source link

linguisticsdown IPA symbols #1

Closed KengyuL closed 6 years ago

KengyuL commented 6 years ago

Thank you for the useful package. I've installed linguisticsdown package and tried to write IPA symbols. Following the video, I cannot create aspirated diacritic as shown in the video. I typed "p vl bilabial plosive" and "aspirated" and the result was "pÊ°" instead of the aspirated symbol in phonetics. I'm wondering if I've done something wrong. It seems that I have problems in all phonetic diacritics, like nasalized diacritics. BTW, I'm quite new to RStudio. If any more information is needed, just let me know. Thank you! : ) linguisticsdown

liao961120 commented 6 years ago

I can't reproduce your result (See the image below). ipa

Maybe its related to encoding problems. Do you have the encoding set to UTF-8 in RStudio? screenshot from 2018-09-13 13-21-22

KengyuL commented 6 years ago

Dear Yongfu, thanks for the reply! I've changed the text encoding settings and still get the wrong diacritics (as shown in the print-screen). Also, I've downloaded and installed "Doulos SIL" and it still does not work. The following are the print-screen of what I get and information of sys.info() and sys.getlocale() from R. If more information is needed, please let me know! Thanks!

linguisticsdown

Sys.info() sysname release version nodename machine login user effective_user "Windows" ">= 8 x64" "build 9200" "LAPTOP-KJKLQBMG" "x86-64" "User" "User" "User"

Sys.getlocale() [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"

Operating System system

liao961120 commented 6 years ago

Try entering Sys.setlocale(category = "LC_ALL", locale = "UTF-8") in the R console.

KengyuL commented 6 years ago

A warning message pops up, as shown below.

Warning message: In Sys.setlocale(category = "LC_ALL", locale = "UTF-8") : OS reports request to set locale to "UTF-8" cannot be honored

Though I change the text encoding into UTF-8, I'm not sure whether R has successfully done so. I created a variable, a, and assigned "hello" to the variable, as shown in a <- "hello" Then, I try the function, print(Encoding(a)). The result showed "unknown". I'm not sure if that means R doesn't successfully change the text encoding. I will try to google if this can be fixed but if you have any suggestion, please let me know! : ) Thanks!

liao961120 commented 6 years ago

I add some code to see if the problem can be fixed. Re-download the package: devtools::install_github("liao961120/linguisticsdown") to see if you can fix this.

KengyuL commented 6 years ago

Dear Yongfu, many thanks for the reply! It works!!!!!! The following is the print-screen of it. linguisticsdown I'm wondering what the issue might be and how the problem is solved. If the explanation might be way too difficult for a naive R beginner like me, just feel free to ignore my request to know how the problem is fixed. Thanks again!

liao961120 commented 6 years ago

This is a great post on solving encoding issues related to Windows. It may be helpful for Windows user.

liao961120 commented 6 years ago

Due to native support for unicode characters, Windows users may have a worse user experience compared to Mac and Linux users. For detail, see Unicode characters in Shiny apps.

shiny-windows