OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] Commented: (OFFICE-1895) RIGHTB and friendsis incompletely specified

    [ http://tools.oasis-open.org/issues/browse/OFFICE-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093#action_16093 ] 

Eric Patterson commented on OFFICE-1895:

More clarification on what Excel Does:

The only difference between the functions (RIGHT vs RIGHTB, LEFT vs LEFTB, LEN vs LENB) is on Far East Locales (e.g. when Primary Editing Language is set to a Far East locale).

For LenB, we first take the string (UTF16) and send it through WideCharToMultiByte (a function on MSDN) using codepage ANSI.  The return value of that is what we return to the user (which should be whatever the number of bytes the string is in code page ANSI).  However in practice, it seems to be the same as Len (see MSDN for WideCharToMultiByte for more details).

For RightB / LeftB, we only return full characters; if we try to return half a character, we return a space instead.  For instance if character X is an East Asian two-byte character, and we do =LEFTB("X", 1), a space is returned.  If we do LEFTB("X",2), X is returned (since it is a two byte character).  =RIGHTB("XX",3) returns " X" where there is a space in front of X

Again, this only works on a PEL that is set to Far East Locale.  Keep in mind all East Asian characters are not two byte (I think some Kana Japanese characters are single byte).

> RIGHTB and friends is incompletely specified
> --------------------------------------------
>                 Key: OFFICE-1895
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-1895
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: Bug
>          Components: OpenFormula
>    Affects Versions: ODF 1.2
>            Reporter: Andreas Guelzow 
>            Assignee: Eric Patterson
>             Fix For: ODF 1.2
> 6.6.6 RIGHTB
> Summary: Return a selected number of text characters from the right, using byte position.
> This description fails to indicate what happens in the likely situation that the selected bytes do not form a complete character sequence. Should that be an error or move to a correct position?
> Similarly for  the otehr ...B functions

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]