erdomke / RtfPipe

Library for processing rich-text format (RTF) streams
MIT License
121 stars 44 forks source link

Encoding problem (crash in test) #6

Closed martinrotter closed 6 years ago

martinrotter commented 6 years ago

I get exception in RtfParser.cs, line 173 codePageStack.Push( encoding == null ? 0 : _encodings[encoding.WebName] );

Exception says: Message "Daný klíč není ve slovníku k dispozici." string (Value with given key is not in dictionary.)

Value of encoding.WebName is encoding.WebName = "Windows-1252", but values in dictionary have lowercase keys! You should make the dictionary key case INsensitive.

martinrotter commented 6 years ago

Same error in UpdateEncoding method.

erdomke commented 6 years ago

In the latest commit, the dictionary was made case insensitive. A new NuGet package will be released shortly.