[BUG] How can one control the text encoding of the R nodes code pane in KNIME?

When typing non-ASCII text (e.g. a French axis label in e.g. ggplot2) in the code pane of an R View node, I've observed that when the image is returned back to KNIME, the text input via the code pane is returned with encoding problems. Typical French non-ASCII characters such as `é` or `à` are sent back to KNIME as `@` or other equivalents in a different code page. The same encoding problems occur with the German `ä ö ü`.
In other R nodes, searches via code containing such characters are consequently impossible - in the code pane, a search for `personnes occupées` would not yield any hits even if the text string is present in a given table sent to R.

There is no such behaviour with text sent to R and back via a table itself - the problems stem from the text entered via the code pane only. In R, the same code would run without any text encoding problems, so it appears to originate from KNIME's R nodes' code pane. The text encoding preferences in both R and KNIME are set to UTF-8 in my configuration. The behaviour is reproducible on Windows (cp1252) but also on Mac OS X (utf-8).

I've got the same problem but with a table. Reading in streaming json data using the R Source (Table) node with the jsonlite package does not return special characters properly. The same code works fine using R Studio though.


anyone else experienced any similar problem? I've noticed it is also visible in ggplot, e.g. where you specify the axis title in the R code.

Hi Geo,

thank you very much for reporting this bug, I will have a look at this. I will tell you once I found something.

Regards, Jonathan.

Thank you Jonathan for taking note of my post.

The described behaviour renders it currently impossible to use non-ASCII characters when communicating with R, thus jeopardising the usefulness of R's text and visual processing, such as `ggplot2`, `stringr` or `tm`. Took me a very long time to figure out the impacts on the latter :-)

Regards, George.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.