Non-ASCII characters in AndurilScript

21 views
Skip to first unread message

marko.k...@gmail.com

unread,
Jun 5, 2014, 2:48:01 AM6/5/14
to andur...@googlegroups.com
How can I enter special (=non ASCII) Unicode characters in AndurilScript without loosing the ASCII compatibility of the source file? I know that we have some escapes for characters such as new line and tab but is there something equivalent to Java/Scala \uDDDD?

Some very ugly workarounds:
  1. Write your strings to a separate file, which is then included. The main source is still plain ASCII.
  2. Import your values as environment variables. Works for some constants, which can be provided externally.

Ville Rantanen

unread,
Jun 5, 2014, 3:05:11 AM6/5/14
to andur...@googlegroups.com
It depends how the special characters are supposed to be rendered.  For instance, with the pandoc HTML generator, i'm using HTML unicode syntax (which of course works for XML too)

"""
* my address: ville rantanen☺helsinki fi
"""

Latex then has it's own syntax for marking specials.. http://en.wikibooks.org/wiki/LaTeX/Plain_TeX#char   \char65  etc..

Someone wiser may answer about the script language parsing itself.
I can recognize that here for example, the script runs, but the contents of the output is not correct
c=StringInput(content="λ")


$ cat c/in
λ



marko.k...@gmail.com

unread,
Jun 5, 2014, 3:15:17 AM6/5/14
to andur...@googlegroups.com
What I would like to do is:

authors = "Åke,Günter" \\ this should read "\u00C5ke,G\u00FCnter"
latexComponent = Lfoo(param1=std.quote(authors, type='LaTeX'))
htmlComponent = Hbar(param1=std.quote(authors, type='HTML'))
Reply all
Reply to author
Forward
0 new messages