[stringtemplate-interest] A problem with a variable name
Sam Harwell
sharwell at pixelminegames.com
Tue Mar 17 07:43:19 PDT 2009
The C# versions of the Tool and StringTemplate read input files in auto-detection mode that recognizes byte encoding marks at the beginning of a file. They should support any input encoding, but there may be bugs. The ANTLR port writes UTF-8 files, although this could be controlled through an option and implemented in AntlrTool.getOutputFile as any encoding.
Sam
-----Original Message-----
From: stringtemplate-interest-bounces at antlr.org [mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Johannes Luber
Sent: Thursday, March 12, 2009 3:34 PM
To: José María Ruiz
Cc: stringtemplate-interest at antlr.org
Subject: Re: [stringtemplate-interest] A problem with a variable name
José María Ruiz schrieb:
> Hi.
>
> I've an object (c#) with a property named "Categoría" (Category in
> english).
>
> When I try to access it in a template, $object.Categoría$, as soon as
> StringTemplate
> find the unicode character "í" it stops interpreting.
>
> What can I do to have unicode characters in the names of my clases and
> variables?
>
> Cheers.
>
As StringTemplate is built upon ANTLR 2.7.7, which supports only ASCII,
I doubt that there is something you can do beyond adding/renaming to
English names. Seeing that you are using the C# version of ST, the for
now unreleased ST 3.2 may be using ANTLR 3.x, but that's pure
speculation on the fact that the creator did finish a version 3
conversion of the ANTLR grammar as well a C# conversion of the ANTLR
tool. But he has to (not) confirm this himself.
Johannes
_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest at antlr.org
http://www.antlr.org/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list