ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* UTF conversion via Lua
@ 2012-02-10 10:22 Procházka Lukáš Ing. - Pontex s. r. o.
  2012-02-10 10:26 ` Thomas A. Schmitz
  2012-02-10 10:57 ` Philipp Gesang
  0 siblings, 2 replies; 22+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-02-10 10:22 UTC (permalink / raw)
  To: ConTeXt

Hello,

I have many files with ASCII encoding; this encoding must be kept as these files are processed also by another program.

When I work with them in ConTeXt, I need to convert them to UTF.

Does Lua (in ConTeXt scope) offer a transformation function or a table of chars [ASCII-code] -> [UTF-code] or anything to provide the conversion?

Something like:

\startluacode
   local str = loadFile("a.txt") -- ASCII coded

   str = context.ACSII2UTF(str) -- Or something like this
\stopluacode

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-02-17  9:20 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-10 10:22 UTF conversion via Lua Procházka Lukáš Ing. - Pontex s. r. o.
2012-02-10 10:26 ` Thomas A. Schmitz
2012-02-10 10:57 ` Philipp Gesang
2012-02-10 11:11   ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-02-10 11:14     ` luigi scarso
2012-02-13 11:42       ` Ulrike Fischer
2012-02-13 13:14         ` luigi scarso
2012-02-10 11:15     ` Wolfgang Schuster
2012-02-10 11:32       ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-02-10 12:25         ` Wolfgang Schuster
2012-02-10 13:15           ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-02-10 15:08             ` Hans Hagen
2012-02-16 11:13           ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-02-16 12:08             ` Hans Hagen
2012-02-16 13:15               ` UTF conversion via Lua (renaming attachments to .scr_) Procházka Lukáš Ing. - Pontex s. r. o.
     [not found]               ` <op.v9rwejuttpjj8f@lpr>
2012-02-16 22:56                 ` Hans Hagen
2012-02-17  8:09                   ` UTF conversion via Lua Procházka Lukáš Ing. - Pontex s. r. o.
2012-02-17  8:19                     ` Hans Hagen
2012-02-17  9:20                       ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-02-10 11:40       ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-02-10 11:30     ` Philipp Gesang
2012-02-10 11:13   ` UTF conversion via Lua (now with attachment) Procházka Lukáš Ing. - Pontex s. r. o.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).