*Synopsis*: [ku1] printf returns "invalid character constant" for $ printf 
"%d\n" "'<euro>"

CR 6805794 changed on Nov 23 2009 by <User 1-2S67RN>

=== Field ============ === New Value ============= === Old Value =============

Integrated in Build    snv_128                                                
Status                 10-Fix Delivered            8-Fix Available            
====================== =========================== ===========================

     
*Change Request ID*: 6805794

*Synopsis*: [ku1] printf returns "invalid character constant" for $ printf 
"%d\n" "'<euro>"

  Product: solaris
  Category: shell
  Subcategory: korn93
  Type: Defect
  Subtype: 
  Status: 10-Fix Delivered
  Substatus: 
  Priority: 3-Medium
  Introduced In Release: solaris_nevada
  Introduced In Build: snv_72
  Responsible Engineer: <User 1-7MTUEB>
  Keywords: opensolaris, oss-request, oss-sponsor

=== *Description* ============================================================
Category
   shell
Sub-Category
   korn
Description
   There seems be a bug in how ast-ksh.2008-11-04's "printf" builtin
handles multibyte characters. For example if I try this in the
en_US.UTF-8 locale ("<euro>" needs to be replace with the EURO symbol):
-- snip --
$ printf "%d\n" "'<euro>"
-ksh93: printf: warning: ': invalid character constant
226
-- snip --
AFAIK the correct behaviour was to return the numeric value of the
<euro> symbol in this case (hexadecimal "20ac", decimal 8364), e.g.
-- snip --
$ printf "%d\n"
"'<euro>"
8364
-- snip --
Frequency
   Always
Regression
   No
Steps to Reproduce
   Enter this in an interractive shell:
$ printf "%d\n" "'<euro>"
Expected Result
   -- snip --
$ printf "%d\n"
"'<euro>"
8364
-- snip --
Actual Result
   -- snip --
$ printf "%d\n" "'<euro>"
-ksh93: printf: warning: ': invalid character constant
226
-- snip --
Error Message(s)
   printf: warning: ': invalid character constant
Test Case
   printf "%d\n" "'<euro>"
Workaround
   None.
Additional configuration information
   Solaris 11/B106

*** (#1 of 1): 2009-02-16 03:05:26 GMT+00:00 <User 1-F4SZV>


=== *Public Comments* ========================================================

=== *Workaround* =============================================================

=== *Additional Details* =====================================================
        Targeted Release: solaris_nevada
        Commit To Fix In Build: snv_128
        Fixed In Build: snv_128
        Integrated In Build: snv_128
        Verified In Build: 
  See Also: 6437624, 6793763
  Duplicate of: 
  Hooks:
        Hook1: 
        Hook2: 
        Hook3: 
        Hook4: 
        Hook5: <email address omitted>
        Hook6: <email address omitted>
  Program Management: 
  Root Cause: Inadequate Algorithm
  Fix Affects Documentation: No
  Fix Affects Localization: No

=== *History* ================================================================
        Date Submitted: 2009-02-16 03:05:25 GMT+00:00
        Submitted By: <User 1-F4SZV>

        Status Changed    Date Updated                  Updated By
        3-Accepted        2009-02-24 14:01:02 GMT+00:00 <User 1-1SURPB>
        6-Fix Understood  2009-06-16 15:34:21 GMT+00:00 <User 1-1SURPB>
        7-Fix in Progress 2009-10-23 18:11:47 GMT+00:00 <User 1-7MTUEB>
        8-Fix Available   2009-10-28 18:23:34 GMT+00:00 <User 1-5HNZ8F>
        10-Fix Delivered  2009-11-23 05:16:57 GMT+00:00 <User 1-2S67RN>


=== *Service Request* ========================================================
        Impact: Significant
        Functionality: Secondary
        Severity: 3
        Product Name: solaris
        Product Release: solaris_nevada
        Product Build: snv_106
        Operating System: solaris_nevada
        Hardware: generic
        Submitted Date: 2009-02-16 03:05:26 GMT+00:00


=== *Multiple Release (MR) Cluster* - 0 ======================================

Reply via email to