bildwelt
E2E FORUM
E2E Bridge E2E Commerce

replace low values in file

E2E Forum Modeling & Development replace low values in file

This topic contains 2 replies, has 3 voices, and was last updated by  Alfred 3 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1769

    django
    Moderator

    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?

    #1778

    Milan
    Blocked

    In an unix/linux environment i would give sed a try. something along the lines:

    sed -e ‘s/\x00/<replace char>/g’ <input> > <output>

    #1779

    Alfred
    Moderator

    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.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.