Hello Umberto, As always, thanks for the quick reply.
Unfortunately, even if I change both LANG and LC_ALL to Shift_JIS, layer.getAttributes still can not get a match. It is only when the shapefile is in UTF-8 and when the tomcat environment is also in UTF-8 can a match be found. I have a funny feeling that the query value is always converted to UTF-8 first before doing a search. Just a hunch though. Thanks. mario. On 8/30/06, Umberto Nicoletti <[EMAIL PROTECTED]> wrote:
Mario, Java mapscript should support international charsets, only make sure that the environment when you start tomcat (or the servlet container of your choice) is configured with the wanted locale. Also note that LANG has lower precedence than the LC_* variables and in particular check LC_ALL. For example if you set LANG=it_IT and LC_ALL=en_US then the setting in effect is en_US. There is an example using the german charset in the examples directory. HTH, Umberto On 8/29/06, Mario Basa <[EMAIL PROTECTED]> wrote: > Hello, > > I have been testing the java mapscript of mapserver-4.10-beta1 and it > seems that layer.queryByAttributes only works with UTF-8 character > encoded shape files and only if tomcat is started also in UTF-8 > (ja_JP.UTF-8) LANG environment. > > I tried using Shift_JIS encoded shape files (99% of all shape files > here in Japan are Shift_JIS encoded) and tomcat restarted in UTF-8 > and then Shift_JIS LANG environments, but I couldn't get it to work > anymore, as in layer.queryByAttributes can not match query items > anymore with the data. > > Is there a work-around for this. > > Thanks. > > Mario. >
