Forum Discussion

Eliza1994's avatar
Eliza1994
Regular Visitor
4 years ago
Solved

How to change the font( language) with R Visuals(library qcc)

Anyone kindly help me to figure out how to change the font(language) into Japanese with R Visuals?   I am a Power BI user in Japan and trying to draw a fishbone visual with R(qcc). I find the scri...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Eliza1994 ,

     

    It looks like R has a hard time reading in non-English characters in as text.

    Maybe these options can help you :

    1. In RStudio, try going in Tool > Global Options > Code > Saving > and then choose the right encoding for Japanese and Mandarin. The UTF-8 enconding might work for you.
    2. The blog post Escaping from character encoding hell in R on Windows explains how to set the encoding to import external documents. It should work with data imported with RODBC as well. The autor uses Japanese characters in his examples.
    3. In the odbcDriverConnect() function of the RODBC package, the argument DBMSencoding="UTF-8" might work for you.
    4. To have the correct characters, you may need to specify the encoding: readLines(url, encoding="UTF-8")

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.