Skip to content

Commit

Permalink
Added GBK as alias for CP936
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Mar 19, 2019
1 parent c08d41e commit a3f6142
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions libvmdk/libvmdk_descriptor_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,12 +966,19 @@ int libvmdk_descriptor_file_read_header(
value );
}
#endif
if( ( value_length == 5 )
&& ( value[ 0 ] == 'U' )
&& ( value[ 1 ] == 'T' )
&& ( value[ 2 ] == 'F' )
&& ( value[ 3 ] == '-' )
&& ( value[ 4 ] == '8' ) )
if( ( value_length == 3 )
&& ( value[ 0 ] == 'G' )
&& ( value[ 1 ] == 'B' )
&& ( value[ 2 ] == 'K' ) )
{
descriptor_file->encoding = LIBUNA_CODEPAGE_WINDOWS_936;
}
else if( ( value_length == 5 )
&& ( value[ 0 ] == 'U' )
&& ( value[ 1 ] == 'T' )
&& ( value[ 2 ] == 'F' )
&& ( value[ 3 ] == '-' )
&& ( value[ 4 ] == '8' ) )
{
descriptor_file->encoding = 0;
}
Expand Down

0 comments on commit a3f6142

Please sign in to comment.