bugGNU Octave - Bugs: bug #54384, unicode conversion fails with...

 
 

bug #54384: unicode conversion fails with error on Solaris system

Submitter:  John W. Eaton <jwe>
Submitted:  Thu 26 Jul 2018 01:03:18 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Solaris/SunOS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 27 Jul 2018 12:53:18 PM UTC, comment #5: 

I grafted the change to stable here:
http://hg.savannah.gnu.org/hgweb/octave/rev/e866bb226d38

For a test I manually commented out "#define HAVE_ICONV 1" from config.h after configure and re-compiled. Calling "native2unicode (234, 'foo')" showed the error message and the BISTs were skipped on "test native2unicode" and "test unicode2native". So I guess it works.

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Thu 26 Jul 2018 09:24:55 PM UTC, comment #4: 

If this works, the patch should be backported to stable.

Rik <rik5>
Group administrator
Thu 26 Jul 2018 05:56:14 PM UTC, comment #3: 

I pushed a changeset here that hopefully somewhat improves the error message and makes the failing BISTs conditional on HAVE_ICONV:
http://hg.savannah.gnu.org/hgweb/octave/rev/5401dfadd2f6

Marking as Ready For Test.

Markus Mützel <mmuetzel>
Group administrator
Thu 26 Jul 2018 02:54:34 PM UTC, comment #2: 

I see this in config.h on the Solaris system:


$ grep ICONV config.h
/* #undef HAVE_ICONV */
#define HAVE_ICONV_H 1
#define ICONV_CONST const
#define ICONV_FLAVOR ICONV_FLAVOR_SOLARIS


John W. Eaton <jwe>
Group administrator
Thu 26 Jul 2018 02:32:30 PM UTC, comment #1: 

This snippet from the gnulib source code might be related:

      /* This is a different error code than if iconv_open existed but didn't
         support from_codeset and to_codeset, so that the caller can emit
         an error message such as
           "iconv() is not supported. Installing GNU libiconv and
            then reinstalling this package would fix this."  */
      errno = ENOSYS;
      return NULL;


This is if HAVE_ICONV is not defined.
Is this macro also available in Octave? Maybe we could show a more meaningful error message.

Markus Mützel <mmuetzel>
Group administrator
Thu 26 Jul 2018 01:03:18 PM UTC, original submission:  

The test suite shows the following errors on Solaris:


>>>>> processing /export/home/eaton/local/src/octave-4.4.1-rc1/scripts/strings/native2unicode.m
***** assert (double (native2unicode (164:170, 'ISO-8859-5')),
        [208 132 208 133 208 134 208 135 208 136 208 137 208 138]);
!!!!! test failed
native2unicode: converting from codepage 'ISO-8859-5' to UTF-8: Operation not applicable
***** assert (double (native2unicode ([164:166 0 167:170], 'ISO-8859-5')),
        [208 132 208 133 208 134 0 208 135 208 136 208 137 208 138]);
!!!!! test failed
native2unicode: converting from codepage 'ISO-8859-5' to UTF-8: Operation not applicable
***** assert (double (native2unicode ([0 0 120.3 0 0 122.6 0 0])),
        [0 0 120 0 0 123 0 0]);
!!!!! test failed
native2unicode: converting from codepage '646' to UTF-8: Operation not applicable

>>>>> processing /export/home/eaton/local/src/octave-4.4.1-rc1/scripts/strings/unicode2native.m
***** assert (unicode2native ("ЄЅІЇЈЉЊ", "ISO-8859-5"), uint8 (164:170));
!!!!! test failed
native2unicode: converting from UTF-8 to codepage 'ISO-8859-5': Operation not applicable
***** assert (unicode2native (["ЄЅІ" 0 "ЇЈЉЊ"], "ISO-8859-5"), uint8 ([164:166 0 167:170]));
!!!!! test failed
native2unicode: converting from UTF-8 to codepage 'ISO-8859-5': Operation not applicable


John W. Eaton <jwe>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by jwe (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-27 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-07-26 mmuetzel StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code