Menu

#16 EscapeNonAscii and UnescapeNonAscii optimization and bug fix

open
nobody
None
5
2011-04-06
2011-04-06
No

I plan to propose this patch as an optimization of the IorUtil.EscapeNonAscii and IorUtil.UnescapeNonAscii that was creating a lot of intermediate strings. But doing so I discovered a bug. UnescapeNonAscii is using the IsPotentiallyEscapedCharacterRepresentation method that looks for an escaoe sequence "\uXXXX". To do so this method was using Char.IsDigit to check that XXXX was correct chars but IsDigit only returns true for decimal numbers and XXXX is an hexadecimal representation with 'A' to 'F' chars.
I have added some tests to check new implementation behavior.
There is also a major optimization of the StringConversions.Destringify method.

Discussion

  • Francois Dumont

    Francois Dumont - 2011-04-06
     
  • Alexander Kornienko

    Hi!
    This patch was integrated in rev. 2012, but I found out that it breaks IntegrationTests/Direct. Error message is:
    Test Error : Ch.Elca.Iiop.IntegrationTests.TestClient.TestIdsIncludingNonAscii
    Ch.Elca.Iiop.GenericUserException : Exception of type 'Ch.Elca.Iiop.GenericUserException' was thrown.
    Could you, please, investigate the issue and fix it?
    Thank you for your efforts.
    Bye!

     
  • Jens Villadsen

    Jens Villadsen - 2011-09-24

    dums, please investigate issue identified by alexfh

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.