I would recommend that you use UTF-8 when handling the templates. That works fine for both Windows and Linux.
Jian http://www.JiansNet.com On Thu, Apr 16, 2009 at 1:28 AM, <[email protected]> wrote: > Hi, > > special characters in a text are stored with one of many file encodings. > Typical for western windows systems is CP1252, for Unix systems it is either > IS08859-1, ISO-8859-15 or UTF8. > > Most of these character sets do not provide a marker system to tell the > reading application how to interpret the bytes into characters (UTF may use > an initial marker for this purpose, but few editors only use it). So you > need to tell your application yourself. > > See how to tell velocity how to read your templates: > > http://velocity.apache.org/engine/devel/developer-guide.html#Velocity_Configuration_Keys_and_Values > with the Character Encoding configuration options. > > If you are using the velocity engine directly, see: > > http://velocity.apache.org/engine/releases/velocity-1.6.2/developer-guide.html#Template_Encoding_for_Internationalization > > > The output.encoding property must be set according to the downstream > application that will read the produced output. With web applications you > can ask the request character encoding property and set the velocity writer > accordingly (the encoding is dynamic and the web client can request to use a > different one than the default of your server). With XML it must match the > encoding declared in the first XML line. > > Kind regards, > Christoph > > > Moreno Lopez, Eva Maria wrote: > > Hello, > > > > We are generating a Word template in our application. In windows all > works ok, but in linux, when the value associated with the variables of the > template have special characters ( ñ, ´, eg..) , the word document generated > by velocity doesn´t recognise that speciall characters. > > > > > > > > Can anybody help us, please? > > > > > > > > Thanks. > > > > > > > > Eva Mª Moreno López > > > > Centro Mixto de I+D de Software Indra - UCLM > > > > Ronda de Toledo s/n > > > > 13005 Ciudad Real (España) > > > > Tel.: (+34) 926 012 120 - ext. 28970 > > > > [email protected] <mailto:[email protected]> > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
