Oxenstierna Andreas ha scritto: > Yes, character sets should have been unified from the beginning of the > computer age... > Codepages are essentially an IBM PC / Windows thing, as described by > Wikipedia. Fairly complete lists are available in the external links, > e.g. http://msdn.microsoft.com/en-us/library/ms776446.aspx. > For us the important issue is to easily use the shapefiles correctly in > different softwares. To my knowledge, the codepage file ('.cpg) is read > by all ESRI softwares and many others as well. And can easily be updated > if needed...
Ok... this still does not tell me how to match a standard charset name with a codepage (by the looks of it there is no 1-1 match, you can just try to make a partial guess). From where I stand one possible way to solve this would have to either add another parameter (codepage) that the shapefile encoder can use, or setup some kind of map going from charset to codepage. I also see nasty issues in the very encoding act, we may end up encode some chars in a way that does not respect the codepage reality, thus making other software have a hard time decoding properly what we wrote. For example, even taking the most common codepage in wester europe, cp1252, there are mismatches between it and ISO-8859-1: http://en.wikipedia.org/wiki/Windows-1252 To properly support codepage encodings we'd have to turn all those tables into software and have encode/decode driven by those tables. The code/decode loops should not be that difficult, the hard part is filling all these codepage <-> UTF-16 tables needed to do the job (and finding their contents in the first place, this http://www.microsoft.com/globaldev/reference/cphome.mspx Microsoft help page seem to list some, thought it's not clear if those U+00xy codes are really unicode or what). Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
