Re: [Gpsbabel-code] No cyrillic characters in garmin_gpi output?
Brought to you by:
robertl
From: Conrad M. <cs...@gm...> - 2013-10-10 17:18:40
|
PS, Cyrillic is representable in CP-1251. So maybe allowing choice of output code-page is appropriate, if possible within the existing framework. On Thu, Oct 10, 2013 at 1:17 PM, Conrad Meyer <cs...@gm...> wrote: > Robert, > > Actually, we already know which int field specifies code page -- see: > > 288 static void > 289 read_header(void) > 290 { > > ... > > 343 > 344 codepage = gbfgetint16(fin); > > And: > > 1418 static void > 1419 garmin_gpi_rd_init(const char* fname) > 1420 { > ... > 1428 if ((codepage >= 1250) && (codepage <= 1257)) { > 1429 snprintf(cp, sizeof(cp), "CP%d", codepage); > 1430 cet_convert_init(cp, 1); > > We just only appear to write out CP-1252 because that is the CET > default for the filetype. > > Thanks, > Conrad > > On Thu, Oct 10, 2013 at 12:42 PM, Robert Lipe <rob...@gm...> wrote: >> Garmin GPI is a reverse engineered format for us. Best we can tell, that >> format uses "Windows ANSI" encoding, a.k.a code page 1252. Since Cyrillic >> isn't representable there, we replace the unknown characters with ? >> >> If you have stronger knowledge of the innards of Garmin GPI files and want >> to work on the writer, it's garmin_gpi.cc in our source tree. The very last >> line controls the output character set that we use. If GPI supports more >> than one code page, It's probable that one ore more of the fields that are >> unknown to us controls which ones. Please be sure to submit representative >> test files with the change when you add such support. >> >> RJL >> >> On Thu Oct 10 2013 at 3:36:39 AM, Steffen Grunewald >> <ste...@gm...> wrote: >>> >>> Hi, >>> >>> I'm trying to convert a GPX file containing geocaches into >>> a GPI (POI) one to use with my road navigation device (a >>> Nüvi 255): >>> >>> gpsbabel -i gpx -o >>> garmin_gpi,category="Geocaches",hide,proximity=200m,sleep=2 -f INFILE -F >>> OUTFILE >>> >>> The GPX contains lines like >>> >>> <desc>воды by petzi&bufonto, multicache >>> (1.5/2)</desc> >>> >>> - that's Russian, meaning "воды" (waters). >>> The GPI output file contains dollar signs instead of the cyrillic >>> characters (snippet from hex dump): >>> >>> 000000C4 30 00 24 24 │ 24 24 20 62 │ 79 20 70 65 │ 74 7A 69 26 │ 62 75 66 >>> 6F │ 6E 74 6F 2C │ 20 4D 75 6C 0.$$$$ by petzi&bufonto, Mul >>> >>> Is this a limitation of the GPI format? Unfortunately, I have >>> no means to use POIloader (which supposedly would also take >>> care of the "TourGuide"-type radial approach alert that would >>> make sense in this context, but AFAIK hasn't been integrated >>> into GPSbabel?) >>> >>> - S >>> >>> >>> ------------------------------------------------------------------------------ >>> October Webinars: Code for Performance >>> Free Intel webinars can help you accelerate application performance. >>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most >>> from >>> the latest Intel processors and coprocessors. See abstracts and register > >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Gpsbabel-code mailing list http://www.gpsbabel.org >>> Gps...@li... >>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-code >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most >> from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gpsbabel-code mailing list http://www.gpsbabel.org >> Gps...@li... >> https://lists.sourceforge.net/lists/listinfo/gpsbabel-code >> |