From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74407 Path: news.gmane.org!not-for-mail From: Philipp Gesang Newsgroups: gmane.comp.tex.context Subject: Re: UTF conversion via Lua Date: Fri, 10 Feb 2012 11:57:32 +0100 Message-ID: <20120210105732.GA30993@phlegethon> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0705857783==" X-Trace: dough.gmane.org 1328871515 430 80.91.229.3 (10 Feb 2012 10:58:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Feb 2012 10:58:35 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 10 11:58:33 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RvoBS-000367-2v for gctc-ntg-context-518@m.gmane.org; Fri, 10 Feb 2012 11:58:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9EF25CB20A; Fri, 10 Feb 2012 11:58:29 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mV+wqaw7gBm8; Fri, 10 Feb 2012 11:58:23 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 56E24CB1ED; Fri, 10 Feb 2012 11:58:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 97FFFCB1ED for ; Fri, 10 Feb 2012 11:58:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8owM-BPR8Nnn for ; Fri, 10 Feb 2012 11:58:18 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id B5B9CCAB03 for ; Fri, 10 Feb 2012 11:58:18 +0100 (CET) Original-Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q1AAv8hJ026215 for ; Fri, 10 Feb 2012 11:57:21 +0100 Original-Received: from ix.urz.uni-heidelberg.de (cyrus-portal.urz.uni-heidelberg.de [129.206.100.176]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id q1AAv7vU022783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 10 Feb 2012 11:57:07 +0100 Original-Received: from extmail.urz.uni-heidelberg.de (extmail.urz.uni-heidelberg.de [129.206.100.140]) by ix.urz.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q1AAv6IG022806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 10 Feb 2012 11:57:06 +0100 Original-Received: from localhost (dslb-188-104-154-238.pools.arcor-ip.net [188.104.154.238]) (authenticated bits=0) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id q1AAv5St009140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 10 Feb 2012 11:57:05 +0100 Mail-Followup-To: mailing list for ConTeXt users In-Reply-To: X-Operating-System: Linux phlegethon 3.2.5-1-ARCH X-Polite-Request: "Please try to be nice, don't send html mail." User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=129.206.100.212; country=DE; region=01; city=Heidelberg; latitude=49.4167; longitude=8.7000; http://maps.google.com/maps?q=49.4167,8.7000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06GwaV8qG - 79dcdda5b72c - 20120210 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:74407 Archived-At: --===============0705857783== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline --azLHFNyN32YCQGCU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-02-10 11:22, Proch=C3=A1zka Luk=C3=A1=C5=A1 Ing. - Pontex s. r. o. = wrote: > Hello, >=20 > I have many files with ASCII encoding; this encoding must be kept as thes= e files are processed also by another program. >=20 > When I work with them in ConTeXt, I need to convert them to UTF. Not needed, as every ASCII string is a valid UTF8 string: =E2=80=9CThe UTF encoding has several good properties. By far the most important is that a byte in the ASCII range 0-127 represents itself in UTF. Thus UTF is backward compatible with ASCII.=E2=80=9D http://doc.cat-v.org/plan_9/4th_edition/papers/utf You can use them in Luatex without further conversion. Regards Philipp >=20 > Does Lua (in ConTeXt scope) offer a transformation function or a table of= chars [ASCII-code] -> [UTF-code] or anything to provide the conversion? >=20 > Something like: >=20 > \startluacode > local str =3D loadFile("a.txt") -- ASCII coded >=20 > str =3D context.ACSII2UTF(str) -- Or something like this > \stopluacode >=20 > Best regards, >=20 > Lukas >=20 >=20 > --=20 > Ing. Luk=C3=A1=C5=A1 Proch=C3=A1zka [mailto:LPr@pontex.cz] > Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] > Bezov=C3=A1 1658 > 147 14 Praha 4 >=20 > Tel: +420 244 062 238 > Fax: +420 244 461 038 >=20 > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to= the Wiki! >=20 > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ --=20 () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments --azLHFNyN32YCQGCU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAk80+BwACgkQ02lYlJYWs9LWrQCZAf+FUcsO210e8tJqlhNEvvZG I14An3ly6AkB2BXw+7abj+SW2DhlsJjm =YZac -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU-- --===============0705857783== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0705857783==--