From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74258 Path: news.gmane.org!not-for-mail From: Philipp Gesang Newsgroups: gmane.comp.tex.context Subject: Re: Problem with Lua processing UTF8 substrings Date: Wed, 1 Feb 2012 21:35:38 +0100 Message-ID: <20120201203538.GA11795@phlegethon> References: <4F2991C9.2090602@gyza.cz> <20120201200555.GA1647@phlegethon> <4F299DD8.7020307@gyza.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2108963823==" X-Trace: dough.gmane.org 1328128552 22711 80.91.229.3 (1 Feb 2012 20:35:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2012 20:35:52 +0000 (UTC) To: hajtmar@gyza.cz, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 01 21:35:51 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 1RsguA-0007JH-C9 for gctc-ntg-context-518@m.gmane.org; Wed, 01 Feb 2012 21:35:46 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8FC4ECB285; Wed, 1 Feb 2012 21:35:45 +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 BOI8XFps6Vly; Wed, 1 Feb 2012 21:35:45 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0DD43CB288; Wed, 1 Feb 2012 21:35:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1DF6DCB288 for ; Wed, 1 Feb 2012 21:35:33 +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 XdDdMya-ZF65 for ; Wed, 1 Feb 2012 21:35:21 +0100 (CET) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id BF8F6CB285 for ; Wed, 1 Feb 2012 21:35:21 +0100 (CET) Original-Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q11KaYbZ028728 for ; Wed, 1 Feb 2012 21:36:34 +0100 Original-Received: from ix.urz.uni-heidelberg.de (cyrus-portal.urz.uni-heidelberg.de [129.206.100.176]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q11KZKpO031061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Feb 2012 21:35:20 +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 q11KZJch029472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Feb 2012 21:35:19 +0100 Original-Received: from localhost (dslb-188-110-101-210.pools.arcor-ip.net [188.110.101.210]) (authenticated bits=0) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id q11KZI8Z016037 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 1 Feb 2012 21:35:19 +0100 Mail-Followup-To: hajtmar@gyza.cz, mailing list for ConTeXt users In-Reply-To: <4F299DD8.7020307@gyza.cz> X-Operating-System: Linux phlegethon 3.2.2-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: No geolocation information available for 129.206.210.211 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0IGsIAyfX - db625cb9aa85 - 20120201 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 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:74258 Archived-At: --===============2108963823== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-02-01 21:17, Jaroslav Hajtmar wrote: > Hello Philipp. > Thanx very much for very quick and perfect help. > Is there any manual or source, where I can read these (and next and > similar) information? I=E2=80=99m sorry I have to disappoint you but the utf library is documented only in the source.[1] Luckily it covers all the functionality of the native string library, thus its usage should be equivalent except that it works for utf sequences as well. If you know some German there=E2=80=99s also a blog post by Patrick.[2] The string.utfcharacters iterator is covered in luatexref-t.pdf. Hope this helps Philipp [1] http://files.luaforge.net/releases/sln/slnunicode/1.1a [2] http://www.luatex.de/2010/02/selene-unicode-bibliothek/?iframe=3Dtrue >=20 > One more thanx > Jaroslav Hajtmar >=20 >=20 >=20 > Dne 1.2.2012 21:05, Philipp Gesang napsal(a): > >\def\mymacro#1{% > > \startluacode > > local utf =3D unicode.utf8 > > local target =3D [=3D=3D[\detokenize{#1}]=3D=3D] > > for i=3D1, utf.len(target) do > > context(utf.sub(target,i,i)..", ") > > end > > \stopluacode% > >} >=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 --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8pohoACgkQ02lYlJYWs9Km7ACdF1Jx30YRKVkpnrQA22CwnkRH XcYAmgLxs8EmzezhREKDtEe1JooXMv8s =iY8H -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s-- --===============2108963823== 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 ___________________________________________________________________________________ --===============2108963823==--