Skip to content

Issue with some utf8 strings and windows #23

@lepennec

Description

@lepennec

Hi,

it seems there is an issue with (at least certain utf8) strings in windows:

gridtext::richtext_grob("Любовь")

is producing a warning:

richtext_grob[GRID.richtext_grob.15] 
Warning messages:
1: In text_info(label, fontkey, fontfamily, fontface, fontsize, cache) :
  unable to translate '<U+041B><U+044E><U+0431><U+043E><U+0432><U+044C>RStudioGD12' to native encoding
2: In do.call(gList, grobs) :
  unable to translate '<U+041B><U+044E><U+0431><U+043E><U+0432><U+044C>' to native encoding

My impression is that the issue in text_info is related to the cache. Indeed:

text_info_cache <- new.env(parent = emptyenv())
 text_info_cache[["Любовь"]]

yields

NULL
Warning message:
unable to translate '<U+041B><U+044E><U+0431><U+043E><U+0432><U+044C>' to native encoding 

Note that I did not have this issue under Linux...

Let me know if I can help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions