Topic
  • 2 replies
  • Latest Post - ‏2013-05-10T04:36:07Z by Debnarayan
Debnarayan
Debnarayan
19 Posts

Pinned topic Reading data with size restriction on Character count

‏2013-05-08T12:07:52Z |

Hi,

I have got a positional flat file with double byte characters. My WTX 8.3 version of the TypeTree is currently reading the data and validing size on Byte count. Is there any way to read data and set validation on Character length instead of Byte length?

e.g., a field has max length 35 and input data for that field is having size 36 Bytes i.e., 35 Characters with a letter having size 2 Bytes.

Thanks in advance,

Thanks,

Debnarayan

  • GPSmith
    GPSmith
    8 Posts

    Re: Reading data with size restriction on Character count

    ‏2013-05-08T13:29:27Z  

    Debnarayan, 

    It sounds like your source data is UNICODE? in which case you would be better served to define your data elements in the tree type through the Data Language options accordingly:    For the element choose Property and expand "Item Subclass", expand "National Language" and then choose the appropriate Data Language.

      

    Regards

    Greg

     

  • Debnarayan
    Debnarayan
    19 Posts

    Re: Reading data with size restriction on Character count

    ‏2013-05-10T04:36:07Z  
    • GPSmith
    • ‏2013-05-08T13:29:27Z

    Debnarayan, 

    It sounds like your source data is UNICODE? in which case you would be better served to define your data elements in the tree type through the Data Language options accordingly:    For the element choose Property and expand "Item Subclass", expand "National Language" and then choose the appropriate Data Language.

      

    Regards

    Greg

     

    Thanks Greg for your input.

    Yes, input file contains UTF-8 encoded multi byte characters. So, I applied 'National language' as 'Western' and 'Data language' as 'UTF-8'. Also changed Item Subclass>Size (content) > Min and Max values to apply restriction on 'Characters' (default is on 'Bytes'). Still input file is not read well; validation map is executing with warning code '28' (Input Type Contains Errors). Once I reduce the length to 35 Bytes (i.e., 34 char), file is validated successfully.

    So, I am thinking if WTX 8.3 Design studio applies validation on Byte Size and not on Char size even if the Size restriction is applied on 'Characters'. Let me know if I should do/check something else.

     

    Thanks,

    Debnarayan