Remove Null Characters

sabzam
Member Posts: 1,149
Hi All,
I am exporting Data to a text file.
The problem is that at the very end of each line before the return for a fresh line a null character is being placed which when opened by notepad shows as a small square box. This is messing up with another system since it is not excepting the file due to this null value.
Is there a way how I can remove this Null Character please
Thanks and Regards
I am exporting Data to a text file.
The problem is that at the very end of each line before the return for a fresh line a null character is being placed which when opened by notepad shows as a small square box. This is messing up with another system since it is not excepting the file due to this null value.
Is there a way how I can remove this Null Character please
Thanks and Regards
0
Comments
-
I think 10 is the ascii value of null.
rest depends on you n your prob.Thanks,
Kashyap0 -
Hi,
Thanks for your reply,
Yes, the problem is that the null character is appearing at the end of each line just before the CR/LF. I want to keep the CR/LF but that null value just before is not allowing the other system to upload the file as it is being corrupt
example
[John, Smith][NullValue][CR/LF]
I want to remove the [NullValue]. I have already tried using the String Truncate but to no success
Regards0 -
I think you should write two lines for that.
One line is to store the characters before null value, and the second line is to start from null value.
I have written a code one year before so I dont remember yet.... bt you can use if cond or for loop to skip the line when you reach at 10.Thanks,
Kashyap0 -
Here's a utility function I wrote a while back. Could probably be done better, but it does the job.
ch is a local Char variable.DelBadChars(String : Text[1024]) : Text[1024] FOR ch := 0 TO 31 DO BEGIN String := DELCHR(String, '=', FORMAT(ch)); END; FOR ch := 127 TO 255 DO BEGIN String := DELCHR(String, '=', FORMAT(ch)); END; EXIT(String);
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions