File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ public static Symbol Read(EndianReader reader)
4141 throw new InvalidDataException ( $ "Symbol length is too high: { length } ") ;
4242 }
4343
44- // use windows-1252 encoding to support extended characters
45- string value = reader . ReadBytesWithEncoding ( ( int ) length , Encoding . GetEncoding ( "Windows-1252" ) ) ;
44+ // use Latin1 encoding to support extended characters
45+ string value = reader . ReadBytesWithEncoding ( ( int ) length , Encoding . Latin1 ) ;
4646 return new Symbol ( length , value ) ;
4747 }
4848
4949 public static void Write ( EndianWriter writer , Symbol lengthString )
5050 {
5151 Encoding . RegisterProvider ( CodePagesEncodingProvider . Instance ) ;
52- byte [ ] bytes = Encoding . GetEncoding ( "Windows-1252" ) . GetBytes ( lengthString . chars ) ;
52+ byte [ ] bytes = Encoding . Latin1 . GetBytes ( lengthString . chars ) ;
5353 writer . WriteUInt32 ( ( uint ) bytes . Length ) ;
5454 writer . WriteBlock ( bytes ) ;
5555 }
You can’t perform that action at this time.
0 commit comments