mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
UTF8 aware parser for some more GPS formats
I'm sure there are better ways to do this, but this appears to grok most rational formats I was able to find. NSEW or positive/negative numbers. Decimal degrees (WGS84) or degrees and decimal minutes (that's what most GPSs seem to provide). I'm sure there are still corner cases that confuse it, but it seemed reasonably robust in testing. I don't really love the ';' as separator but that solves the obvious problem with locales that use a decimal comma. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0a91669efe
commit
546fecd850
2 changed files with 83 additions and 8 deletions
1
dive.h
1
dive.h
|
|
@ -548,6 +548,7 @@ const char *weekday(int wday);
|
|||
const char *monthname(int mon);
|
||||
|
||||
#define UTF8_DEGREE "\xc2\xb0"
|
||||
#define UCS4_DEGREE 0xb0
|
||||
#define UTF8_SUBSCRIPT_2 "\xe2\x82\x82"
|
||||
#define UTF8_WHITESTAR "\xe2\x98\x86"
|
||||
#define UTF8_BLACKSTAR "\xe2\x98\x85"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue