You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Java implementation of the Integer.toHexString method does not prepend the string with the leading zeros (the spec requires it to be 4 characters long), for that reason they are manually prepended with zeros to get the required length.
NPOI Version
2.7.1
File Type
Reproduce Steps
Create a PromptBox or ErrorBox with special characters (new line, for example).
Issue Description
The issue was introduced as part of the backporting of the fix for
POI Bug 60370 - XSSFDataValidation, promptBox, \n ignored (no multiline)
.The bug was introduced as part of the translation of the Java implementation of the
encodeUtf
to C#:Original code:
https://github.com/apache/poi/blob/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java#L151
C# code:
https://github.com/nissl-lab/npoi/blob/2.7.1-rc1/ooxml/XSSF/UserModel/XSSFDataValidation.cs#L163
The Java implementation of the
Integer.toHexString
method does not prepend the string with the leading zeros (the spec requires it to be 4 characters long), for that reason they are manually prepended with zeros to get the required length.The proper implementation in C# will look like:
In case you want to use the
HexDump
helper it should be something like this:The text was updated successfully, but these errors were encountered: