changeset 632:38face2a84a4

metadata are utf-8 strings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Apr 2021 18:54:36 +0200
parents 9fa56c042d92
children 06bea33cb7d0
files Sphinx/source/faq/features.rst
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/faq/features.rst	Fri Apr 16 18:50:33 2021 +0200
+++ b/Sphinx/source/faq/features.rst	Fri Apr 16 18:54:36 2021 +0200
@@ -97,10 +97,15 @@
 mechanism <orthanc-storage>`. However, metadata is stored directly
 inside the database, whereas attachments are stored as separate files
 on the filesystem (the database only stores a reference to the
-attachments). Choosing between metadata and attachments is a matter of
-trade-off: Metadata must be kept small (as a rule of thumb, under 1KB)
-and used if fast access is needed, whereas attachments can be used to
-store arbitrarily large piece of data.
+attachments). Choosing between metadata and attachments is most often
+a matter of trade-off: Metadata must be kept small (as a rule of
+thumb, under 1KB) and used if fast access is needed, whereas
+attachments can be used to store arbitrarily large piece of data.
+
+However, pay attention to the fact that metadata must be UTF-8 strings
+terminated by the ``\0`` character. If you need to store arbitrary
+binary objects, use an attachment or use `Base64 encoding
+<https://en.wikipedia.org/wiki/Base64>`__.
 
 Also note that metadata and attachments are only available for
 resources stored inside Orthanc. Once one DICOM instance leaves the