libyal / libvmdk

Library and tools to access the VMware Virtual Disk (VMDK) format
GNU Lesser General Public License v3.0
168 stars 66 forks source link

Unsupported descriptor file encodings GBK and Big5 #10

Open SuperGod opened 8 years ago

SuperGod commented 8 years ago

The vmdk file header is like:

image

I debug the libvmdk,and find the error is happen at line 977 in libvmdk\libvmdk_descriptor_file.c

                else if( libclocale_codepage_copy_from_string(
                          &( descriptor_file->encoding ),
                          value,
                          value_length,
                          LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS,
                          error ) != 1 )
                {
                    libcerror_error_set(
                     error,
                     LIBCERROR_ERROR_DOMAIN_RUNTIME,
                     LIBCERROR_RUNTIME_ERROR_GET_FAILED,
                     "%s: unable to determine codepage value from string.",
                     function );

                    goto on_error;
                }

so maybe libclocale_codepage_copy_from_string not support code page string like "GBK"?

joachimmetz commented 8 years ago

That could be correct, this part of VMDK was undocumented last time I checked. I'll have a look to add GBK support when time permits.

sinmygit commented 7 years ago

I have got the save problem,and the vmdk coding is 'GBK' and 'Big5'

joachimmetz commented 5 years ago

GBK support which is presumed to map to Windows cp936 for now added in https://github.com/libyal/libvmdk/commit/a3f61426ac7c09e4510e991c80b49b30c6aaf377

joachimmetz commented 5 years ago

"Big5" also seems to be a broader standard like GBK but I'll map this to windows cp950 for now

https://en.wikipedia.org/wiki/Big5 https://en.wikipedia.org/wiki/GBK_(character_encoding)

joachimmetz commented 5 years ago

Big5 support which is presumed to map to Windows cp950 for now added in https://github.com/libyal/libvmdk/commit/4b09bb827d9335a842ba6dd7e1e1f6cd47669504

joachimmetz commented 5 years ago

based on https://github.com/libyal/libclocale/pull/5, one thing that could be useful is to create a VMDK with an "euro sign" that can be shared. That should give more resolution on which encoding is actually used for GBK.