when I’m reading text file using Read Text activity, so data is not reading same.
Input data in Text file - ISA00 00 08 9258130000 08 9262950DSD 250122 0902U 00401000010455 0P >…
GSOG 90852733796178873001 202501220902 10192T 004010UCS…
ST875 000058202…
G50N 20250122*12054330…
N9DP 62…
G6202 202501243 0000…
G66 MZZ…
**G23 013*10 30…
**N1 STS/R TRI CITY PLAZA 90069724180350…**
**N3 35-TALCOTTVILLE RD…**
N4VERNON CT*060660000…
N1VN HP HOOD EFT9 001008697…
N1BT WAKEFRN FOOD9 0069724180000…
G6816 CA4.08 004410010320PI 620000262…
G69*HVD GALLON…
G687 CA2.17 004410010189PI 620000264…
so when I’m reading using Read text activity so at the end of each line data is converting (�) instead of (…)
Output Data - ISA00 00 08 9258130000 08 9262950DSD 250122 0902U 00401000010455 0P >�
GSOG 90852733796178873001 202501220902 10192T 004010UCS�
ST875 000058202�
G50N 2025012212054330�
N9 DP62�
G62 0220250124 30000�
G66M ZZ�
G2301 3***10 30�
N1ST S/R TRI CITY PLAZA9 0069724180350�
N335-TALCOTTVILLE RD�
N4 VERNONCT 060660000�
N1VN HP HOOD EFT9 001008697�
N1BT WAKEFRN FOOD9 0069724180000�
G6816 CA4.08 004410010320PI 620000262�
G69HVD GALLON�
G68 7CA 2.17004410010189 PI*620000264�
Please help me how can I solve this issue?
Input file
Text File Data.txt (580 Bytes)
Yoichi
(Yoichi)
March 27, 2025, 6:56am
2
Hi,
For now, can you try to set “UTF-8” at encoding property as the following?
Regards,
1 Like
Hi @Ankit_Chauhan
Have you enforced an encoding type? could you check the properties
Yoichi:
set “UTF-8
Hi @Ankit_Chauhan
In the read text file activity property just change Encoding = UTF-8
Happy Automation
I have tried the same Encoding “UTF-8” but not working.
can you please help me again?
Yoichi
(Yoichi)
March 27, 2025, 8:01am
6
Hi,
To isolate cause, can you try to run the following sample in your environment?
Sample
Sample20250327-3.zip (3.1 KB)
Regards,
Hi @Ankit_Chauhan
Based on the presence of special characters like … in input text file you sent, instead of … , it seems like the file was originally encoded in Windows-1252 (ANSI) or ISO-8859-1 , but it is being misinterpreted as UTF-8 when read.
Try setting the Encoding property in the Read Text File activity to:
iso-8859-1
Alternatively, if that doesn’t work, try:
windows-1252
Can you try this
Hi @Ankit_Chauhan
Try this Encoding:
System.Text.Encoding.GetEncoding(“windows-1252”)
fileContent = System.IO.File.ReadAllText(“C:\path\to\your\file.txt”, System.Text.Encoding.UTF8)
Thanks, It’s working for me
1 Like
system
(system)
Closed
March 30, 2025, 10:33am
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.