Closed earnaud closed 3 years ago
This also leads to problems with make_eml()
:
invalid UTF-8 input in readChar()
Thanks for reporting this issue @earnaud. Please email me the data and metadata template so I can test further.
A fix is underway at branch fix_73.
I once again came up with a file encoded with accents upon CatVars step. Has this commit been pushed?
EAL v. 2.18.1
EDIT
Silly me, posting the EAL version without noticing this is not even the last one released.
It's currently in the development branch, with the new messaging feature that needs a little more work. Is it possible to reference development until released into master?
Upon using template_annotations()
I get the following error:
Error in enc2utf8(data_table) : argument is not a character vector
It seems you try to use enc2utf8
over a data frame (or so). One thing could be to translate data_table
as an array() (which in fact is a multidimensional vector) and then apply enc2utf8.
@earnaud I don't see this line of code in the development branch version of template_annotations()
(EAL 2.19.0). What version is throwing this error?
Here is where I found it in earnaud/EMLassemblyline@development
:
$ grep --line-number enc2utf8.data R/*
R/template_arguments.R:147: names(data_tables) <- enc2utf8(data_table)
Found it! data_table
in the context of enc2utf8(data_table)
is the table name as a character string. If you send the table and table attributes template I will look at the issue in more detail.
@earnaud I was unable to reproduce this error with the files you sent, but I have added a precautionary step of converting inputs to character strings (e.g. enc2utf8(as.character(data_table))
).
Ok, I do not get it fully then. Closing it for now.
Upon templating CatVars on a DP, I ran across the problems of accents in international use of EAL. R reads a string containing accent until reaching the accented character and returns the beginning of the string. For example, "Bouée 1" and "Bouée 2" both become "Bou", introducing duplicated catvar codes.
Using R base
iconv()
might help resolve this upon reading files.