E2E Forum › Modeling & Development › replace low values in file
This topic contains 2 replies, has 3 voices, and was last updated by Alfred 4 years, 1 month ago.
I have to read a File that contains low values. If I read it with FlatfileParser or FileSystemAdapter, it stops at the first low Value. Is there a way to replace those values before reading the file?
In an unix/linux environment i would give sed a try. something along the lines:
sed -e ‘s/\x00/<replace char>/g’ <input> > <output>
A little background why this error happens. Strings in the xUML Runtime are Unicode strings represented in UTF-8 and a zero byte is the end of string marker.
The FileSystem adapter can read the data because it will return a blob. But then converting the blob to string does not work because it stops at the zero byte.
I have no ready solution for replacing the zero byte in the blob. Perhaps an intermediate step converting it to base64 or hex and replacing the zero byte is possible.
You must be logged in to reply to this topic.