Recent

Author Topic: Text file encoding recognition  (Read 4664 times)

typo

  • Hero Member
  • *****
  • Posts: 3051
Text file encoding recognition
« on: August 19, 2010, 08:50:59 pm »
What is the better way to recognize the encoding of a text file before opening it and then load it appropriately?
« Last Edit: August 19, 2010, 09:09:07 pm by typo »

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1947
Re: Text file encoding recognition
« Reply #1 on: August 20, 2010, 01:42:32 am »
You could use charencstreams.pas
http://wiki.lazarus.freepascal.org/Theodp

See the simple example in the Wiki and/or the more complex demo in the demo/charenc folder.

 

TinyPortal © 2005-2018