[sapug] linux/win difference

Garry Trethewey garrytre at bigpond.com
Wed Feb 1 09:04:23 CET 2012


Hi all

I've got this irritating problem that I can't imagine can exist. I'm 
doing a small conversion to a gpx file that is produced by a Windows 
program & gets used by another Windows program.

this code:-

LF_CR = chr(13) + chr(10)
oldStrWin = '</trkseg>' + LF_CR + '<trkseg>'
newStrWin = '</trkseg>' + LF_CR + '</trk>' + LF_CR *2 + '<trk>' + LF_CR 
+ '<trkseg>'
outStr = inStr.replace(oldStrWin, newStrWin)

- works as I'd expect in linux, but in Win Vista or Win 7 it doesn't.

So result in win vista & 7 :-
</trkseg>
<trkseg>

Results in linux :-
</trkseg>
</trk>

<trk>
<trkseg>

I have no idea what other info is relevant, but I'm happy to provide it.

thanks in anticipation
------------------------------------
Garry Trethewey
------------------------------------




More information about the sapug mailing list