File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ namespace Format {
1313
1414constexpr  std::string_view TEXT = " keyvalues2"  ;
1515constexpr  std::string_view BINARY = " binary"  ;
16+ constexpr  std::string_view SRCTOOLS_UTF8_TEXT = " unicode_keyvalues2"  ;
17+ constexpr  std::string_view SRCTOOLS_UTF8_BINARY = " unicode_binary"  ;
1618
1719} //  namespace Format
1820
Original file line number Diff line number Diff line change @@ -50,9 +50,10 @@ DMX::DMX(const std::byte* dmxData, std::size_t dmxSize) {
5050		return ;
5151	}
5252
53- 	if  (this ->encodingType  == Format::BINARY) {
53+ 	//  Srctools formats indicate that all strings are specifically UTF-8.
54+ 	if  (this ->encodingType  == Format::BINARY || this ->encodingType  == Format::SRCTOOLS_UTF8_BINARY) {
5455		this ->opened  = this ->openBinary (stream);
55- 	} else  if  (this ->encodingType  == Format::TEXT) {
56+ 	} else  if  (this ->encodingType  == Format::TEXT ||  this -> encodingType  == Format::SRCTOOLS_UTF8_TEXT ) {
5657		this ->opened  = this ->openText (dmxData, dmxSize);
5758	}
5859}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments