... \enableregime - nice idea! Despite this, I'm still not able to make work the example:
---- Test.mkiv \enableregime[cp1250] \starttext \startluacode function loadFile(fn) local fh = assert(io.open(fn, "r")) local str = fh:read("*all") fh:close() return str end context.startregime{"cp1250"} context(loadFile("a.txt")) context.stopregime() \stopluacode \stoptext ---- Where's the problem? Lukas On Fri, 10 Feb 2012 12:15:29 +0100, Wolfgang Schuster <schuster.wolfg...@googlemail.com> wrote:
Am 10.02.2012 um 12:11 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:... Well, my information was not correct. There are characters > 127 in the file, like "ř", "š"... Each char = 1 byte, and as I'm using Windows with CP 1250, the characters are displayed correctly. But I have problem loading them into ConTeXt. I need to convert the bytes > 127 to UTF sequence, which would be acceptable by ConTeXt. @Thomas: The table looks nice but there are no entries for CP 1250 to UTF conversion. I prepared some tables: character conversion and removal of diacritics (see the attachment); maybe it would be handful to include them into ConTeXt somehow.Why don’t you let do context the conversion: \starttext this is something in utf8 \startregime[cp1250] \input filewithcp1250encoding \stopregime more text encoded in utf8 \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038
abc ý
Test.mkiv
Description: Binary data
___________________________________________________________________________________ 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 ___________________________________________________________________________________