You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2010/05/12 09:22:28 UTC

DO NOT REPLY [Bug 49273] New: Font.getCharSet return byte is error

https://issues.apache.org/bugzilla/show_bug.cgi?id=49273

           Summary: Font.getCharSet return byte is error
           Product: POI
           Version: 3.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: longxibo@sina.com


Sample XSSFont.getCharSet:
public byte getCharSet() {
        CTIntProperty charset = _ctFont.sizeOfCharsetArray() == 0 ? null :
_ctFont.getCharsetArray(0);
        int val = charset == null ? FontCharset.ANSI.getValue() :
FontCharset.valueOf(charset.getVal()).getValue();
        return (byte)val;
    }
//When val great 127,then (byte)val is negative!
//So return type is should change to int

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 49273] Font.getCharSet return byte is error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49273

--- Comment #2 from longxibo@sina.com 2010-05-13 02:43:14 EDT ---
(In reply to comment #1)
> Any chance you could upload a file with a character set outside the 0-127
> range? That can then be used as part of a unit test for the change.

ok,I upload a xlsx file.When character set  is GB2312(character set value is
134),Scene is occur!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 49273] Font.getCharSet return byte is error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49273

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Nick Burch <ni...@alfresco.com> 2010-05-25 12:26:06 EDT ---
Thanks for the sample file. Fix and unit test added in r948089.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 49273] Font.getCharSet return byte is error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49273

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ni...@alfresco.com> 2010-05-12 06:53:12 EDT ---
Any chance you could upload a file with a character set outside the 0-127
range? That can then be used as part of a unit test for the change.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 49273] Font.getCharSet return byte is error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49273

longxibo@sina.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 49273] Font.getCharSet return byte is error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49273

--- Comment #3 from longxibo@sina.com 2010-05-13 03:42:09 EDT ---
Created an attachment (id=25434)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25434)
It is have GB2312 charact set

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org