Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansicpg RTF command gives error #73

Open
fvanheeswijk opened this issue Mar 14, 2022 · 0 comments
Open

ansicpg RTF command gives error #73

fvanheeswijk opened this issue Mar 14, 2022 · 0 comments

Comments

@fvanheeswijk
Copy link

We have an RTF with \ansicpg-535 as command, it gives the following error:

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at RtfPipe.TextEncoding.EncodingFromCodePage(Int32 codePage)
at RtfPipe.Parser.GetControlWord(String name, Int32 number)
at RtfPipe.Parser.d__18.MoveNext()
at RtfPipe.Parser.Parse()
at RtfPipe.Rtf.ToHtml(RtfSource source, XmlWriter writer, RtfHtmlSettings settings)
at RtfPipe.Rtf.ToHtml(RtfSource source, RtfHtmlSettings settings)

In joniles/rtfparserkit#13 I have found a similar issue, apparently negative numbers need to be treated differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant