Korean(UTF-8) encoding breaks when texts provided by `str_glue`
Đang mở
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- R
- Star
- 2.7k
- Fork
- 641
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Korean(UTF-8) encoding breaks when texts provided by str_glue
Brief description of the problem
- Korean(UTF-8) encoding breaks (it returns a unicode like string '<U...><U...>') in shiny application operated on docker
- works properly with docker based on mac; does not with docker based on linux server
- breaks only and if only when a plot including Korean texts that is provided with function
str_glueis ported toplotly - Korean texts that is not related to the function
str_gluedoes not break
docker envirionments
FROM rocker/shiny-verse:latest
# system libraries of general use
RUN apt-get update && apt-get install -y \
sudo \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
libssh2-1-dev
### install R packages required
RUN R -e "install.packages(c('hms','devtools'))"
RUN R -e "devtools::install_version('shiny', version='1.6.0', dependencies=T)"
RUN R -e "devtools::install_version('shinydashboard', version='0.7.1', dependencies=T)"
RUN R -e "devtools::install_version('plotly', version='4.9.4.1', dependencies=T)"
RUN R -e "devtools::install_version('DT', version='0.19', dependencies=T)"
RUN R -e "devtools::install_version('tidyverse', version='1.3.1', dependencies=T)"
RUN R -e "devtools::install_version('data.table', version='1.14.2', dependencies=T)"
RUN R -e "devtools::install_version('scales', version='1.1.1', dependencies=T)"
RUN R -e "devtools::install_version('bdscale', version='2.0.0', dependencies=T)"
RUN R -e "devtools::install_version('hrbrthemes', version='0.8.0', dependencies=T)"
RUN R -e "devtools::install_version('showtext', version='0.9-4', dependencies=T)"
RUN R -e "devtools::install_version('stringi', version='1.7.3', dependencies=T)"
insert reprex here
font_add_google("Nanum Gothic")
showtext_auto()
df
# A tibble: 13 × 4
col TRT CTRL total
<chr> <int> <int> <int>
1 72365 25 152 177
2 72368 25 143 168
3 72369 25 54 79
4 74927 25 151 176
5 70647 25 93 118
6 76992 25 111 136
7 79735 25 106 131
8 74516 25 161 186
9 70920 25 125 150
10 78630 25 164 189
11 79495 21 125 146
12 79496 24 145 169
13 70105 0 66 66
p <- df %>%
ggplot(aes(x = '', y = total, text = str_glue("ID: {col}\n처리군 건수: {TRT}\n전체 건수: {total}"))) +
geom_boxplot(color = "gray") +
geom_point(aes(x = '', y = total, color = TRT==0), size = 2.5, position = position_jitterdodge()) +
scale_color_manual(values = c("#DA135F", "gray")) +
xlab("") + ylab("") + guides(color = 'none') +
theme(axis.ticks.x=element_blank(), axis.text.x=element_blank()) +
theme_ipsum(base_family = "Nanum Gothic")
ggplotly(p, tooltip = c("text")) %>%
layout(xaxis = list(title = "", visible = TRUE), showlegend = FALSE)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với R reprex trong issue và so sánh hành vi của nó trong các môi trường Docker dựa trên macOS và Linux. Theo dõi văn bản chú giải công cụ bằng tiếng Hàn từ str_glue qua ggplotly và plotly; được xem là hoàn tất khi văn bản tiếng Hàn hiển thị chính xác thay vì dưới dạng các chuỗi giống Unicode trong đầu ra của plotly.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- plotly, r
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100