<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;"><br></div><br><br><br><hr id="stopSpelling">> Date: Sat, 29 Dec 2007 19:59:52 +0100<br>> From: bram.degreve@bramz.net<br>> To: shapelib@lists.maptools.org<br>> Subject: Re: [Shapelib] Re: shapelib improvements<br>> <br>> Mateusz Loskot wrote:<br>> > As you say, UTF-16 is used *internally*. Actually, Java supports Unicode<br>> > in a *mess*, exposing Unicode in 3 or 4 different ways, including their<br>> > own modified version of UTF-8 encoding (brrr!).<br>> > So, actually, different components of Java use different standard,<br>> > for exmaple Data{Input|Output}Stream uses modified UTF-8,<br>> > OutputStreamWriter and InputStreamReader can use *any* encoding,<br>> > String can use *any* encoding, etc.<br>> ><br>> > For me, Java and Windows arguments are irrelevant here because Shapelib<br>> > does not use system specific API of any of the systems listed above.<br>> > Shapelib is just a data storage/transfer layer and as such, the only<br>> > portable and IMHO reasonable choice is UTF-8.<br>> > UTF-16 and UTF-32 make more troubles than it's worth.<br>> > UTF-8 is more natural choice because:<br>> > - UTF-8 works well with legacy platforms and clients that only<br>> > support 8-bit characters<br>> > - UTF-8 is compatible with ASCII<br>> > - UTF-8 is more compact<br>> > - UTF-8 is byte oriented instead of word oriented<br>> > - UTF-8 is C strings friendly<br>> > - UTF-8 is more efficient (it depends on range of content)<br>> > - UTF-8 is compatible with all Unix systems as well as recommended in<br>> > standards and protocols like W3C, IETF, IMC, etc.<br>> ><br>> > All these suggest me that UTF-8 support easier to implement for highly<br>> > portable data storage software like Shapelib is.<br>> ><br>> > <br>> I'm working on an UTF-8 version of the IO hooks for shapelib for my work<br>> on pyshapelib, though it is getting some delay as there are other issues<br>> that need my limited spare time.<br>> <br>> Cheers,<br>> Bramz<br><br>OK you guys have convinced me :) UTF-8 is the most portable and easiest to implement so we should go with that.<br>-Andy<br><br /><hr />Get the power of Windows + Web with the new Windows Live. <a href='http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007' target='_new'>Get it now!</a></body>
</html>