From fbe70656a19750870b054d09fbaf3e2cd4bce16a Mon Sep 17 00:00:00 2001 From: Aviezer Lifshitz Date: Thu, 23 Dec 2021 12:24:20 +0200 Subject: [PATCH] Docs@attributes and values should be in ascii encoding (#59) * docs: attributes and values should be in ASCII encoding see #58 * removed accidently added file --- R/track.R | 2 ++ man/emr_track.attr.set.Rd | 2 ++ src/EMRTrack.cpp | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/R/track.R b/R/track.R index 1e9fa09a..af77d6e1 100644 --- a/R/track.R +++ b/R/track.R @@ -317,6 +317,8 @@ emr_track.attr.rm <- function(track = NULL, attr = NULL) { #' This function creates a track attribute and assigns 'value' to it. If the #' attribute already exists its value is overwritten. #' +#' Note that both attributes and values sould be in ASCII encoding. +#' #' @param track track name #' @param attr attribute name #' @param value value diff --git a/man/emr_track.attr.set.Rd b/man/emr_track.attr.set.Rd index f8c81976..4b7dcacc 100644 --- a/man/emr_track.attr.set.Rd +++ b/man/emr_track.attr.set.Rd @@ -22,6 +22,8 @@ Assigns a value to the track attribute. \details{ This function creates a track attribute and assigns 'value' to it. If the attribute already exists its value is overwritten. + +Note that both attributes and values sould be in ASCII encoding. } \examples{ diff --git a/src/EMRTrack.cpp b/src/EMRTrack.cpp index 96e13967..6e0ace5b 100644 --- a/src/EMRTrack.cpp +++ b/src/EMRTrack.cpp @@ -193,10 +193,10 @@ EMRTrack::TrackAttrs EMRTrack::load_attrs(const char *, const char *filename) } else { if (idx) { if (name.empty() || val.empty()) - TGLError(BAD_FORMAT, "Invalid format of attributes file %s", filename); + TGLError(BAD_FORMAT, "Invalid format of attributes file %s (1)", filename); if (attrs.find(name) != attrs.end()) // duplicated attributes - TGLError(BAD_FORMAT, "Invalid format of attributes file %s", filename); + TGLError(BAD_FORMAT, "Invalid format of attributes file %s (2)", filename); attrs[name] = val; name.clear(); @@ -210,7 +210,7 @@ EMRTrack::TrackAttrs EMRTrack::load_attrs(const char *, const char *filename) TGLError(FILE_ERROR, "Failed to read attributes file %s: %s", filename, strerror(errno)); if (idx) - TGLError(BAD_FORMAT, "Invalid format of attributes file %s", filename); + TGLError(BAD_FORMAT, "Invalid format of attributes file %s (3)", filename); return attrs; }