Add additional type identifiers h,w,k

Like for xdxf, no processing is done, the raw content is shown.
This commit is contained in:
Peter
2017-07-27 08:15:45 +02:00
parent af6362f5df
commit 835dffcaf8

View File

@@ -142,8 +142,10 @@ static std::string parse_data(const gchar *data, bool colorize_output)
p += sizeof(guint32); p += sizeof(guint32);
while (guint32(p - data)<data_size) { while (guint32(p - data)<data_size) {
switch (*p++) { switch (*p++) {
case 'm': case 'h': // HTML data
case 'l': //need more work... case 'w': // WikiMedia markup data
case 'm': // plain text, utf-8
case 'l': // not utf-8, some other locale encoding, discouraged, need more work...
sec_size = strlen(p); sec_size = strlen(p);
if (sec_size) { if (sec_size) {
res+="\n"; res+="\n";
@@ -153,8 +155,8 @@ static std::string parse_data(const gchar *data, bool colorize_output)
} }
sec_size++; sec_size++;
break; break;
case 'g': case 'g': // pango markup data
case 'x': case 'x': // xdxf
sec_size = strlen(p); sec_size = strlen(p);
if (sec_size) { if (sec_size) {
res+="\n"; res+="\n";
@@ -164,7 +166,7 @@ static std::string parse_data(const gchar *data, bool colorize_output)
} }
sec_size++; sec_size++;
break; break;
case 't': case 't': // english phonetic string
sec_size = strlen(p); sec_size = strlen(p);
if(sec_size){ if(sec_size){
res += "\n"; res += "\n";
@@ -176,15 +178,15 @@ static std::string parse_data(const gchar *data, bool colorize_output)
} }
sec_size++; sec_size++;
break; break;
case 'k': case 'k': // KingSoft PowerWord data
case 'y': case 'y': // chinese YinBiao or japanese kana, utf-8
sec_size = strlen(p); sec_size = strlen(p);
if (sec_size) if (sec_size)
res += std::string(p, sec_size); res += std::string(p, sec_size);
sec_size++; sec_size++;
break; break;
case 'W': case 'W': // wav file
case 'P': case 'P': // picture data
sec_size = get_uint32(p); sec_size = get_uint32(p);
sec_size += sizeof(guint32); sec_size += sizeof(guint32);
break; break;