chl-wxp commented on code in PR #10383:
URL: https://github.com/apache/seatunnel/pull/10383#discussion_r2716115736


##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/CsvReadStrategy.java:
##########
@@ -145,15 +146,23 @@ public void readProcess(
                     }
                 }
             }
-            // read lines
+            // read header lines
             List<String> headers = getHeaders(csvParser);
+            // Clean up BOM characters (\ uFEFF) in the header to solve 
occasional BOM residue
+            // issues
+            List<String> cleanedHeaders =
+                    headers.stream()
+                            .map(header -> header.replace("\uFEFF", "").trim())

Review Comment:
   Are there any other characters besides `\uFEFF` that can cause this problem? 
In addition, does the reading of text and excel also have this problem?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to