Re: [NTG-context] UTF conversion via Lua (renaming attachments to .scr_)
On 16-2-2012 14:14, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Would it be possible to provide this?
I'll provide: regimes.toregime('8859-1',"abcde Ä","?") but you'll have to test and wikify it. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hello Hans,
thank you for the extension; I've tested and it works perfectly.
On Thu, 16 Feb 2012 23:56:44 +0100, Hans Hagen
regimes.toregime('8859-1',"abcde Ä","?")
but you'll have to test and wikify it.
I'll going to wikify it - - I supppose: regimes.toregime(<target-regime>, <text-to-convert>, <third-arg>) so question - what is the <third-argment> used for? Maybe as default character when the UTF code cannot be mapped to <target-regime>? (It didn't happen in my case, so I can just estimate what <third-arg> is for.) Best regards, Lukas
Hans
-- 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
On 17-2-2012 09:09, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello Hans,
thank you for the extension; I've tested and it works perfectly.
On Thu, 16 Feb 2012 23:56:44 +0100, Hans Hagen
wrote: regimes.toregime('8859-1',"abcde Ä","?")
but you'll have to test and wikify it.
I'll going to wikify it -
- I supppose:
regimes.toregime(<target-regime>, <text-to-convert>, <third-arg>)
so question - what is the <third-argment> used for?
Maybe as default character when the UTF code cannot be mapped to <target-regime>?
yes
(It didn't happen in my case, so I can just estimate what <third-arg> is for.)
then you should make a test for it (just take some chinese character and see if it becomes a ?) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, 17 Feb 2012 09:19:16 +0100, Hans Hagen
On Thu, 16 Feb 2012 23:56:44 +0100, Hans Hagen
wrote: regimes.toregime('8859-1',"abcde Ä","?")
but you'll have to test and wikify it.
Wikified - http://wiki.contextgarden.net/Encodings_and_Regimes#Conversion_between_encod.... 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
participants (2)
-
Hans Hagen
-
Procházka Lukáš Ing. - Pontex s. r. o.