Sun Java System Calendar Server 6 2005Q4 Developer's Guide

Changing Language or Character Set

To insert a request for data to be returned in a language other than the system default, set either the lang or charset parameter. Note that the system default for language is now a server preference that you set in the ics.conf file. See theSun Java System Calendar Server 6 2005Q4 Administration Guide for details. The login command uses only the lang parameter.

For the set_calprops command, in most cases, specifying the lang parameter is enough. However, it might be necessary, in some instances, to use the charset parameter instead of the lang parameter. For example, if the user wants the requested data returned in a specified character set, then the user must specify it using charset. One possible charset value is: iso-8859-1. For more information on formatting specifications, see the RFC's referenced in Formatting Standards.


Note –

Please note that when the user requests data in iCalendar or XML format, data always returns in UTF-8 format, per the RFC specification. Setting charsetdoes not change this.


Here is a list of the valid lang values:

de

German 

en

English (the default) 

es

Spanish 

fr

French 

it

Italian 

ja

Japanese 

ko

Korean 

ru

Russian 

sv

Swedish 

zh_CN

Chinese or Simplified Chinese 

zh_TW

Taiwanese 


Note –

This does not mean that all of these languages are currently supported by the server. Please check with your Sun Java Enterprise System representative to find out which languages are currently supported by the server.


For example, enter the following if you want to insert an event into the calendar:


storeevents.wcap?id=${SESSIONID}&calid=id&summary=summary
                                &location=location
                                &desc=desc
                                &charset=euc-jp

As another example, suppose that the location value is two Japanese characters whose unicode values are \\u3068\\u30889. In this case, the location value is %A4%C8%A4%E9. Note that all non-ASCII characters should be URL-encoded according to the value of the charset parameter, which in this case is euc-jp. The following command is an example of same data sent in Shift_JIS:


storeevents.wcap?id=${SESSIONID}&calid=id
                                &summary=summary
                                &location=location
                                &desc=desc
                                &charset=Shift_JIS

In the above example, the location value is %82%C6%82%E7.

WCAP uses the value of the charset parameter to convert the data from the URL-encoded value into UTF-8 before storing it into the database. It is stored internally in UTF-8.

The charset parameter in this command have the same role as in the storeevents.wcap because the set_calprops command takes non-ASCII data. The charset parameter in this command does not have any other special meaning.

If charset is not specified, WCAP expects the data to be URL-encoded in UTF-8.