Better UNICODE support (UCS-2/UTF-8) for Exif.UserComment (#2017)

- BOM is now checked and correctly handled
- auto-detection of UTF-8 string if no BOM available, otherwise assume
it's an UCS-2/UTF-16 string
- try to autodetect endianess of UTF-16 string by counting zeros
- possibility to enable writing BOM for this field (disabled for now)
- for undefined charset (empty identifier), RT now assume that the
string is what glib think is the local charset (not tested), and try to
convert it to UTF-8 for display/editing

JIS is still not handled though.
This commit is contained in:
Hombre
2018-01-01 14:24:47 +01:00
parent 96863bb956
commit 9d2ccc19d3
3 changed files with 140 additions and 20 deletions

View File

@@ -236,6 +236,8 @@ public:
void initLongArray (const char* data, int len);
void initRational (int num, int den);
static void swapByteOrder2 (char *buffer, int count);
// get basic tag properties
int getID () const
{