0

I have recently checked my robot framework scripts into TFS (new project). I am using the Eclipse IDE (Oxygen 4.7.1a), RED - Robot Editor Repository & Team Explorer Everywhere plugins. However, when team members get the latest version of the code out of TFS and attempt to run, they get the following error:

[ ERROR ] Error in file 'C:\Development\robot-scripts\Source\Development\dev 
– Consumer Deposit & Loan\Resources\Common\CommonLib.robot': 
UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 81: 
invalid start byte

TFS or TEE plugins are changing the encoding of the files and the robot scripts will not execute. My original code base works perfectly. Any suggestions appreciated!

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
scttech
  • 107
  • 3
  • 12
  • What's the encode settings for your original code? You can compare the original with thee ones checked out by other team members. Then try resetting the encode. – Andy Li-MSFT Jan 08 '18 at 07:23
  • All files (both from TFS and my original code base) appear to be ANSI. – scttech Jan 08 '18 at 22:16

1 Answers1

0

Please check the original file encoding, then try to set the default file encoding in Eclipse. Refer to my answer in this thread for the steps.

You can also reference the solution mentioned by Ahmad: Before getting latest in eciplse, try to run one program using UTF-8 encoding first.

Other threads for your reference:

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • If I change the encoding, will the setting recurse through the entire code base? – scttech Jan 08 '18 at 22:17
  • @scttech Yes, but it just reflect on the files which retrieved by Eclipse.The original code in TFS repository will not be affected. By default the encoding in Eclipse should be UTF-8. So, you can try changing it to ANSI. – Andy Li-MSFT Jan 09 '18 at 01:42
  • Issue has not been resolved. Still getting the encode error. I've been working with my good code base to keep things moving. But as for now, no solution. As I mentioned above, All files (both from TFS and my original code base) appear to be ANSI. I did set the text file encoding to UTF-8 and tried to run the scripts. Still an issue. – scttech Jan 16 '18 at 14:35
  • @scttech You can try to set ANSI as the default encoding in Eclipse (Following the steps mentioned [here](https://stackoverflow.com/questions/47302273/tfs-eclipse-selenium-when-i-import-project-from-tfs-to-eclipse-it-will-not-be-u/47320806#47320806)), then try adding a new workspace and getting the sources from TFS, check it again. – Andy Li-MSFT Jan 17 '18 at 01:52
  • When I type in ANSI, it states that the "selected encoding is not supported" – scttech Jan 17 '18 at 15:02
  • ANSI is also not an option in any of the drop down list selections – scttech Jan 17 '18 at 15:33
  • Since ANSI encoding is the same as Windows-1252, I followed the instructions given by Andy above. Still get the encoding error. Then I started all over and created a new Eclipse workspace, set all the encoding settings to Windows-1252 & did a new TFS project & checkout. Run the script & STILL get the encoding error. Very frustrating – scttech Jan 17 '18 at 17:01
  • @scttech Have you tried that in Visual Studio, does it have the same issue? – Andy Li-MSFT Jan 18 '18 at 01:40
  • @scttech Yes I know, just want to check if VS works, if VS works, you can compare the settings between VS and Eclipse, just for troubleshooting. – Andy Li-MSFT Jan 19 '18 at 01:54