-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NUL characters in US ASCII getting converted to space character i.e " " insted of empty value. #481
Comments
Hi, thanks for the issue report. Could you please add
Btw, does this option help removing extra spaces: |
Hi @yruslan String_trimming_policy is set to none in our case as we need to preserve the spaces while reading the file. Here are the options we are using to read the file: Please find the Sample file below: Please open this file in np++ to get the reference to NUL character . Expected Output: |
Hi, Before looking deeper please try:
ASCII charset is set using this option: |
Sure @yruslan will try this. |
Hi @yruslan We have tried removing option 'ebcdic_code_page':'CP037' and added .opt ion("improved_null_detection", "true") but still it not working as we expect. To be more clear: Thanks in advance |
Currently, all characters that are lower than 0x20 are replaced by spaces. If all characters in a field are 0x00, and Will check your file. Probably the correct behavior for ASCII would be not replacing lower characters with spaces and always skipping 0x00. This is something that needs to be implemented on our side. |
Sure thanks. |
This should be fixed in this branch: You can test it by building that branch. |
Thanks @yruslan . This fix is helping us resolve the issue. |
Great! It will be released as a new version sometime next week |
We have an US ASCII fixed byte length file .
File Contents:
1234 t ----> this row having three spaces
4567NULNULNULf -----> this row is having 3 NUL characters
CopyBook Contents:
01 tablename
05 record_ID PIC x(3)
05 record_status PIC x(3)
05 record_flag PIC x(1)
expected output:
[Row(record_ID='1234', record_status=' ',record_flag='t'),
Row(record_ID='4567',record_status='',record_flag='f')]
Actual Output :
[Row(record_ID='1234', record_status=' ',record_flag='t'),
Row(record_ID='4567',record_status=' ',record_flag='f')]
We are expected an empty value insted we are getting three white spaces. We are seeing the onprem data is an empty value. Can you please help us understand why we are seeing this issue in the scenario.??
@yruslan Can you please help us on this.
The text was updated successfully, but these errors were encountered: