Skip to content
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

Line truncation when x'00' encountered in source member #1917

Closed
AndrewIBMi opened this issue Mar 6, 2024 · 2 comments · May be fixed by #2192
Closed

Line truncation when x'00' encountered in source member #1917

AndrewIBMi opened this issue Mar 6, 2024 · 2 comments · May be fixed by #2192
Labels
discussion For questions, or when something isn't working as expected

Comments

@AndrewIBMi
Copy link

Describe the bug
When a line contains the x'00' hexadecimal character (null), it will result in line truncation in VSCode.

To Reproduce
Steps to reproduce the behavior:

  1. Replace a space in the middle of any line of code with x'00' (this could be done with the RDi Hex Edit Line action)
  2. Save the source member
  3. Open the source member in VSCode
  4. All contents of the line following that hexadecimal character will be truncated

Expected behavior
RDi and SEU interprets these characters as spaces. It would be nice if VSCode did the same, as I've found a number of source members on my company's development system that contain these characters (not sure how they got there, though).

Screenshots
RDi Hex Editor with x'00' hexadecimal:
image

VSCode's interpretation of the line:
image

Environment (please complete the following information):

  • Extension version: v2.8.0
  • IBM i OS version: 7.4
@worksofliam
Copy link
Contributor

@AndrewIBMi Thanks for this interesting issue!

Some initial thoughts from me:

  1. I don't think we have any control over how the null character [specifically] gets rendered in VS Code. We've had more luck with source colors from SEU, but null is an entirely new beast.
  2. I think if we were to support this, we would actually replace the null character with a space and then the nulls would be gone from any future saves. I believe @chrjorgensen would agree with me on this.
  3. I believe if we support this kind of behavior, which is not normal, then it would go against what we are striving for (to be the best modern editor) and would, in-theory, continue to allow this kind of practice in the future. I think the entire core team would agree with me here.

If we do one of these, then it will be option 2. Let me get back to you!

@worksofliam worksofliam added the discussion For questions, or when something isn't working as expected label Mar 6, 2024
@worksofliam worksofliam linked a pull request Sep 3, 2024 that will close this issue
5 tasks
@chrjorgensen
Copy link
Collaborator

@AndrewIBMi I would suggest you use SQL to fix any source members having lines with x'00' in them - use the TRANSLATE function to replace the null with a space.

Better fix the problem at the origin than later in the chain...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion For questions, or when something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants