I'm trying to use ssphys from the trunk instead of ssphys_utf8 and I'm
trying to force the XML to use a locale.
With Linux it's been an odyssey figuring out how to add a new locale to an
existing system. I found that the default set of locales installed on
Fedora don't include one with a 1252 code page, but the character map is
there. I'm not sure how to build a new locale from the included files yet,
but I found how to make one from the glibc sources, and was able to get
setlocale to load it.
Assuming you have glibc extracted somewhere, you'll find a localedata
directory within. You can use this command to generate a new locale tree:
cd localedata
localedef -f CP1252 -i en_US /tmp/en_US.CP1252
localedef "compiles" some text files in the localedata subdirectories to
create efficient binary files used by glibc's locale machinery.
Change the ownership on the output directory and contents to root.root and
move it to /usr/lib/locale. You can now issue this call to use the new
locale:
setlocale(LC_ALL, "en_US.CP1252");
You can get the same effect by issuing "LANG=en_US.CP1252" from the command
line and then invoking setlocale like this:
setlocale(LC_ALL, ""); // uses LANG from environment
So far I haven't been able to specify just the character set (".CP1252") I
think it's because the default locale on my system is "C" and there's no
"C.CP1252" available. I have to specify the whole shebang.
With Linux and glibc I can query the current locale's character map using
this:
printf("encoding: %s", nl_langinfo(CODESET));
I could use this to create the encoding string for the XML generated, but I
can't find an equivalent for Windows. Anyone know of one? This would let us
extract the encoding from the environment instead of setting it within
ssphys.
_______________________________________________
vss2svn-users mailing list
Project homepage:
http://www.pumacode.org/projects/vss2svn/
Subscribe/Unsubscribe/Admin:
http://lists.pumacode.org/mailman/listinfo/vss2svn-users-lists.pumacode.org
Mailing list web interface (with searchable archives):
http://dir.gmane.org/gmane.comp.version-control.subversion.vss2svn.user