String Encodings in R

Strings、Encodings in R

Xianying Tan

2018/03/18

技术 / #R #programming #encoding #data.table

Translated with AI assistance, originally written in Chinese · 阅读中文原文

After quite a bit of effort, I finally managed to thoroughly fix the Chinese support issues in data.table (PR#2678, PR#2566), PR#3451, PR#3849, PR#3850. Here are some scattered notes on what I learned along the way, for future reference:

Learning Notes

Character-encoding-issues: However, if they need to be interpreted as characters or output at C level then it would normally be correct to ensure that they are converted to the encoding of the current locale: this can be done by accessing the data in the CHARSXP by translateChar rather than by CHAR.

Other Notes

Key References