hansva opened a new issue, #9255:
URL: https://github.com/apache/hop/issues/9255

   ### Apache Hop version?
   
   2.20.0
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   ### What happened?
   
   A field's trim setting (left, right, both) treats whitespace differently 
depending on the field's type. For Timestamp and Internet address fields it 
removes only plain spaces. Tabs, non-breaking spaces and other Unicode 
whitespace stay in the value, so parsing it fails.
   
   Every other value type trims through `Const.trim`, `Const.ltrim` and 
`Const.rtrim`, which remove all of these.
   
   #### Example
   
   1. Read a file with Text file input (or another input that parses text into 
typed fields) where a value is `<TAB>2024/05/17 10:00:00.123456789<NBSP>`, or 
`<TAB>127.0.0.1<NBSP>`.
   2. Set the field's type to Timestamp (or Internet address) and Trim type to 
both.
   3. The value doesn't parse: the tab and the non-breaking space are still 
there.
   4. The same value in a Date or Number field is trimmed and parses correctly.
   
   Non-breaking spaces are common in data copied from web pages and 
spreadsheets.
   
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to