Skip to main content

Hello everyone,

Im thinking about the best way how to check encoding of ASCII (.txt) file in FME Desktop.

But, is is possible, at all?

Now, I have TXT reader in my workspace nd then I use stringsearcher transformer to check unsupported letters. Im not sure if it is the best way...

Thank You so much!

Lubo

Unless the text file contains a BOM (byte-order mark) in the first two characters to indicate Unicode, there really is no definitive way of knowing which encoding a text file contains. If you can make a lot of fairly hard assumptions, you can assume that it's probably this or that, but in reality even that is stretching it a bit.

If the text files does contain a BOM header, FME should be able to auto-detect it correctly, although it may depend on your specific use case.

See also: https://softwareengineering.stackexchange.com/questions/187169/how-to-detect-the-encoding-of-a-file

 


Unless the text file contains a BOM (byte-order mark) in the first two characters to indicate Unicode, there really is no definitive way of knowing which encoding a text file contains. If you can make a lot of fairly hard assumptions, you can assume that it's probably this or that, but in reality even that is stretching it a bit.

If the text files does contain a BOM header, FME should be able to auto-detect it correctly, although it may depend on your specific use case.

See also: https://softwareengineering.stackexchange.com/questions/187169/how-to-detect-the-encoding-of-a-file

 

@david_r,

thank You so much, I thought that the solution is hardly reachable...