Skip to content

Normalization fails for some strings #106

@ermshiperete

Description

@ermshiperete

Normalizing a string that decomposes to a string that is exactly 10 bytes longer fails with the following stack trace:

Icu.WarningException : An output string could not be NUL-terminated because output length==destCapacity. 
  at Icu.ExceptionFromErrorCode.ThrowIfError (Icu.ErrorCode e, System.String extraInfo, System.Boolean throwOnWarnings) [0x00301] in /home/eberhard/Develop/icu-dotnet/source/icu.net/ErrorCode.cs:414 
  at Icu.ExceptionFromErrorCode.ThrowIfError (Icu.ErrorCode e) [0x00001] in /home/eberhard/Develop/icu-dotnet/source/icu.net/ErrorCode.cs:369 
  at Icu.NativeMethods.GetString (System.Func`3[T1,T2,TResult] lambda, System.Boolean isUnicodeString, System.Int32 initialLength) [0x00033] in /home/eberhard/Develop/icu-dotnet/source/icu.net/NativeMethods/NativeMethods.cs:426 
  at Icu.NativeMethods.GetUnicodeString (System.Func`3[T1,T2,TResult] lambda, System.Int32 initialLength) [0x00001] in /home/eberhard/Develop/icu-dotnet/source/icu.net/NativeMethods/NativeMethods.cs:414 
  at Icu.Normalization.Normalizer2.Normalize (System.String src) [0x0002c] in /home/eberhard/Develop/icu-dotnet/source/icu.net/Normalization/Normalizer2.cs:226 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions