Skip to main content
Solved

read file connector UTF-8 and UTF-8-BOM ; indicium versus Windows GUI

  • September 30, 2022
  • 3 replies
  • 95 views

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12

I am reading xml files in a system flow with the new read file connector. I have a few files that are being read correctly and a few that are corrupted. The difference between the files is the encoding: the 'good’ files are UTF-8 encoded and the others are UTF-8-BOM. The latter is not read correctly, resulting in a string that looks like this:

?<?xml version="1.0" encoding=

The old read disk file does the same. However, my current Proces flow is working correctly.

I have the feeling that the connectors behave different when comparing the Windows GUI (proces flow) and Indicium (system flow). I have noticed this before when I was trying to read a pdf file. The problem was the other way around: I was unable to read the pdf file correctly in the Windows gui but it works fine in a system flow.

Main question: how do I read both an UTF-8 and an UTF-8-BOM correctly using the read file connector in a system flow?

Best answer by Hugo Nienhuis

I have been able to bypass the problem by reading as varbinary and convert the file within SQL Server to UTF-8 with the statement: select @ubl_bestand_vc = convert(varchar(max), @ubl_bestand_data,0).

 

However, it might be something to look into

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
  • Author
  • Superhero
  • 136 replies
  • Answer
  • September 30, 2022

I have been able to bypass the problem by reading as varbinary and convert the file within SQL Server to UTF-8 with the statement: select @ubl_bestand_vc = convert(varchar(max), @ubl_bestand_data,0).

 

However, it might be something to look into


Mark Jongeling
Administrator
Forum|alt.badge.img+23

Thanks for sharing the solution 😄

We'll select your answer as Best answer and feel free to create a ticket for this in case you think we should look into this.


Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
  • Author
  • Superhero
  • 136 replies
  • October 5, 2022

I am not going to write a ticket, but why can I choose Write preamble Yes/No in a Write file connector, and not do the same for a Read file connector? Maybe it belongs in the idea section?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings