BaseCamp Export Uploads: issue explained

I've spent many hours getting to the bottom of the problem of not being to Upload BaseCamp Exported GPX files to Connect. Here's what's wrong. Unfortunatly, it is a technical problem that will take some computer savy to understand and work around. Garmin BaseCamp & Connect teams should get together and fix it.

Jumping right to the end of the story, the problem is BaseCamp (at least the current version) puts 3 extra bytes at the beginning of the exported GPX file. (The hex codes are EF BB BF) These bytes do not correspond to any characters that will be displayed with a normal text editor. The only way to see them is with a "Hex editor" such as XV132 (free... Google it.) If these 3 bytes are deleted the file will Upload to Connect. If they are there, it will not Upload. XV132 allows you to delete them.

My guess is the Garmin BaseCamp programmer put these characters in just so his favorite text editor would recognize the GPX file as using UTF-8 character encoding. He apparently didn't bother to chat with the Connect programmer.

Does Garmin read these posts?

Eds
  • I looked into this a bit further. The 3 leading bytes are called the Byte Order Mark. They are to allow XML editors/interpreters to determine the encoding (i.e., hex representation) of the characters in the file. Since the problem did not arise (apparently) until BaseCamp 3.2.2, sombody must have decided they should be there, but the Connect team wasn't informed.

    I've also found that you can git rid of the BOM with the Notepad++ editor, also free for download. Just open the GPX file with Notepad++, click on Encoding, and select "Convert to UTF-8 without BOM" and save the file. This is a bit more convenient than working with the hex editor.
  • Former Member
    0 Former Member over 13 years ago
    I looked into this a bit further. The 3 leading bytes are called the Byte Order Mark. They are to allow XML editors/interpreters to determine the encoding (i.e., hex representation) of the characters in the file. Since the problem did not arise (apparently) until BaseCamp 3.2.2, sombody must have decided they should be there, but the Connect team wasn't informed.


    Although in theory anything reading UTF-8 files should be able to handle the BOM, it seems like lots of applications and services have problems.

    Probably best to bring this to Garmin's attention in the BaseCamp 3.2.2 thread, I'll do that now.
  • Former Member
    0 Former Member over 13 years ago
    I can confirm that BaseCamp 3.2.2 writes out the BOM, while BaseCamp 3.2.1 doesn't.

    This was not intended, we'll have to investigate why this is happening.
  • Former Member
    0 Former Member over 13 years ago
    I looked into this a bit more, and I do think this is an issue with Garmin Connect.

    There is no reason why having the BOM should prevent Garmin Connect from reading the file.

    We'll work with Garmin Connect to fix this.

    Thanks for reporting and all your investigative work. :)
  • Thanks for reporting and all your investigative work. :)


    It was fun 'tracking' it down! Thanks for looking into it.

    Ed
  • This thread is AWESOME! You guys saved my life. I have found another particularly troublesome effect of opening files in BaseCamp from my Garmin GPSmap 62S. Once you use Base Camp to modify the gpx file in any way, it will no longer appear in Track Manager when you turn the unit back on! Using Notepad++ to change the encoding fixes the file so that it appears on my hand held once again. Thankyou, Thankyou, Thankyou....:D:D:D:D
  • Former Member
    0 Former Member over 13 years ago
    I'll have to investigate if I can reproduce the behavior on the 62.

    That would indeed be very bad.
  • FALAGAR: I hope you were able to confirm my observation about the 62S not displaying my tracks because of the encoding issue? It would be nice to know that you were able to reproduce...
  • Former Member
    0 Former Member over 13 years ago
    I did test this with a 62s and a 62st with the newest firmware. Read a track from the device, renamed it and changed the color. Sent it back to the device.

    Everything still worked (the gpx file did have a BOM).

    Could you attach a gpx file that the device doesn't read? Which firmware version do you have for the 62s?
  • bad file

    I opened this file in Basecamp. Deleted a line and exited.

    I disconnected from PC and turned the 62s on, it still displays in track list on the device.

    Next I reconnected to the PC and attempted to do a manual file upload to Connect, I got the "can not upload" error.

    I am attempting to upload test.gpx for you.

    The issue of tracks disappearing from the track list on the 62s seems like it may be another problem which I can not seem to isolate. I was creating custom maps for my 62s today. I had connected and disconnected the 62s numerous times, always being careful to use "Safely remove hardware" first. After one disconnect, my entire track list was empty. I had to use Notepad++ and change the encoding for each of the files so that they would reappear on the device. Guess I need to chech the threads or start a new one for that.