Skip to Main Content
IBM Power Ideas Portal


This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Not under consideration
Workspace IBM i
Categories IBM i Access Family
Created by Guest
Created on Jun 26, 2024

Request for improvement of space padding when transferring data in UTF16LE

Please refer to AAA.jpg for the data on the host side.

 If you specify text format (UTF16LE) when transferring this data and receive it, the number of blank characters in the received text will change. (See AAA_UTF16LE.txt) 
 

This phenomenon does not occur in text format (ShiftJIS). (See AAA_UTF16LE.txt)
 

 I was told that this is working as per the specifications, but if the number of blank characters changes, it cannot be used as fixed-length text, so I would like this to be improved.

Idea priority Medium
  • Guest
    Reply
    |
    Jul 12, 2024
    Thank you for submitting your Idea to enhance IBM i Access Client Solutions (ACS). Using a Unicode encoding as a target encoding for mixed data EBCDIC is problematic for maintaining the number of bytes defined for the data and for visual alignment when viewed in a text editor using a fixed width font.

    The conversion from EBCDIC bytes will result in a Unicode code point for each character represented by the EBCDIC, but the bytes needed for Unicode data varies depending on the specific data. For example, assume we have a column defined with a length of 12 bytes with rows that have the following data:
    Row1: 5 DBCS characters that represent 5 Unicode characters. In UTF-16 this is 10 bytes. Padding to 12 bytes requires 1 more Unicode character.
    Row2: 4 DBCS characters and 2 SBCS characters. This is 6 Unicode characters that need 12 bytes. No padding required.
    Row3: 12 SBCS characters need 12 Unicode characters. For UTF-16, this is 24 bytes. This means there are more bytes required than the field length.
    DBCS=Double Byte Character Set
    SBCS=Single Byte Character Set

    This example shows that any row where the EBCDIC represents more than 6 characters will result in overflowing the field length with the bytes needed for the Unicode characters. In general, it is not possible to maintain the field length when using UTF-16 as a target encoding. With UTF-32 and UTF-8, more scenarios will result in overflow since a UTF-32 character is 4 bytes and UTF-8 is a variable length encoding and several characters are 2 or more bytes.
    Any EBCDIC DBCS character will result in a Unicode character that is visually double width and every EBCDIC SBCS character will result in a Unicode character that is single width. The visual alignment depends on the number of double width and single width characters in the data.

    For these reasons, using a Unicode encoding for an ASCII text file will not produce results that maintain the field length or visual alignment.
    ACS always uses the field length as a byte count for the data in the ASCII text file. This is different than Access for Windows which does something different when targeting a Unicode encoding for an ASCII text file. Access for Windows multiplied the field length times the maximum size of a character in the specific encoding. For UTF-16 and UTF-32 that ends up being a character count. But for UTF-8, it used the maximum number of bytes that could be used for each character.

    Since ShiftJIS already provides the alignment you need, we have no plans to make changes for UTF-16 as requested.

    IBM Power Systems Development