Author Topic: Text file encoding  (Read 1807 times)

Tags:
  • All members
  • Posts: 345
Text file encoding
« on: 13 Feb 2020, 19:24 »
Hey guys... Is there a reason why the encoding for the action of writing to a text file is UCS-2 LE BOM?

It is causing no end of problems as any other program that wants to write to the file.. it comes out gobbledeegook! (Chinese characters etc)

Can you please change it? To UTF8 or ANSI?

Please?

  • Administrator
  • Posts: 8819
  • Gender: Female
*
Re: Text file encoding
« Reply #1 on: 17 Feb 2020, 10:49 »
Hello!

To my knowledge, the format of a file written to by a trigger is UTF-16 LE (provided that the file did not exist prior to the trigger trying to write into it). If the file had already existed before you wrote to it with a trigger, check what program created it and what encoding it chose.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 345
Re: Text file encoding
« Reply #2 on: 17 Feb 2020, 10:59 »
Not sure that is the case Oxa...!

Brand new file.. never before been created...

Open it up in notepad++ after MF Pro has written to it and it will say UCS-2 LE BOM for the encoding!

Try it if you don't believe me!

Screenshots if you wish..?

  • Administrator
  • Posts: 8819
  • Gender: Female
*
Re: Text file encoding
« Reply #3 on: 17 Feb 2020, 11:17 »
I believe what you are saying.

I also know what I'm seeing when I open a file my trigger has created. The encoding is UTF-16.

So there could be differences in our systems, as the program does not intentionally choose that UCS encoding to create a file with.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • Moderator
  • Posts: 3653
*
Re: Text file encoding
« Reply #4 on: 18 Feb 2020, 07:24 »
Hi
If it's any help I tested this. For me a MF generated text file encoding is detected as follows:

notepad > automatic detection > UTF-16LE
notepad++ > automatic detection > UCS-2 LE BOM
word > conversion dialogue > Unicode

for info, Notepad++ documentation does refer to encoding detection as not being an exact science  
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 345
Re: Text file encoding
« Reply #5 on: 18 Feb 2020, 07:52 »
All I know is .. I let MF Pro create a file.. then use another program (Filemaker) to write to that text file a selections name.... and it comes out in Chinese writing!

It's not really a problem.. I am a resourceful guy and have found a way around it! Just thought I would bring it up in case other people might be having problems....


 

Please note, BetFair is seems to be currently OFFLINE