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

Extract from text file corrupts non-UTF8 files #10950

Open
dkarlovi opened this issue Sep 24, 2024 · 1 comment
Open

Extract from text file corrupts non-UTF8 files #10950

dkarlovi opened this issue Sep 24, 2024 · 1 comment
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@dkarlovi
Copy link

Bug Description

If you're using the "Extract from text file" node to convert binary data into JSON, it will corrupt the data if it's not UTF8.

To Reproduce

  1. create a file, put S0FSTE9WScSGICA= after having base64-decoded it into it, this contains Karlović encoded using Windows-1250
  2. read it with Read file
  3. extract it with Extract from text file
  4. it gets corrupted

If I use this in the following code node without it, it works:

const body = iconv.decode(await this.helpers.getBinaryDataBuffer($itemIndex, 'file_0'), 'cp1250');

If I use the Extract node, it gets corrupted.

Expected behavior

Non-UTF8 encodings also work

Operating System

Docker image n8nio/n8n

n8n Version

1.59.3

Node.js Version

v20.17.0

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Sep 24, 2024

Hey @dkarlovi,

We have created an internal ticket to look into this which we will be tracking as "GHC-251"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants