diff --git a/openmpt123/openmpt123_sndfile.hpp b/openmpt123/openmpt123_sndfile.hpp index 550c83d497..d4efb31fc5 100644 --- a/openmpt123/openmpt123_sndfile.hpp +++ b/openmpt123/openmpt123_sndfile.hpp @@ -117,7 +117,7 @@ class sndfile_stream_raii : public file_audio_stream_base { case match_recurse: break; case match_exact: - if ( mpt::transcode( mpt::common_encoding::utf8, extension ) == format_info.extension ) { + if ( mpt::transcode( sndfile_encoding, extension ) == format_info.extension ) { if ( flags.use_float && ( subformat_info.format == SF_FORMAT_FLOAT ) ) { return matched_result( format, format_info, subformat_info, match_mode ); } else if ( !flags.use_float && ( subformat_info.format == SF_FORMAT_PCM_16 ) ) { @@ -126,7 +126,7 @@ class sndfile_stream_raii : public file_audio_stream_base { } break; case match_better: - if ( mpt::transcode( mpt::common_encoding::utf8, extension ) == format_info.extension ) { + if ( mpt::transcode( sndfile_encoding, extension ) == format_info.extension ) { if ( flags.use_float && ( subformat_info.format == SF_FORMAT_FLOAT || subformat_info.format == SF_FORMAT_DOUBLE ) ) { return matched_result( format, format_info, subformat_info, match_mode ); } else if ( !flags.use_float && ( subformat_info.format & ( subformat_info.format == SF_FORMAT_PCM_16 || subformat_info.format == SF_FORMAT_PCM_24 || subformat_info.format == SF_FORMAT_PCM_32 ) ) ) { @@ -135,7 +135,7 @@ class sndfile_stream_raii : public file_audio_stream_base { } break; case match_any: - if ( mpt::transcode( mpt::common_encoding::utf8, extension ) == format_info.extension ) { + if ( mpt::transcode( sndfile_encoding, extension ) == format_info.extension ) { return matched_result( format, format_info, subformat_info, match_mode ); } break;