On 13 February 2011 18:01, Julio <[email protected]> wrote:
> Well, I read your explanation and I think you don't answer it properly
> because you haven't understand the problem. I try to explain it in English.
> Although, I can make grammar mystakes.
>
> I have installed in Suse 11.2, I know that apertium has been prepared to
> Devian and Ubuntu. I only say that you know that people can install it in
> other linux distribution.
>
> I found the following mistake in the program:
>
> When I was installing apertium-3.2.0, the program says that I have to
> install lttoolbox-3.1.0 which program is not in the source forge. Although,
> I have change the configure file to the version lttoolbox-3.2.0 to install
> and it works. Then, I think you can change the configure file to accept the
> lttoolbox-3.2.0  to fix this problem.
>

Ok, I misread that; possibly because I was convinced lttoolbox 3.2 had
been released.

> The other problem is not a big deal for you. Because I want to use the
> program to execute in webmin, perl or php in the same computer where I can
> use apertium in the shell.The problem is that I can use apertium in the
> shell and I don't have any problem with the encoding.
> Nevertheless, when I use the apertium with php or perl the program can't
> manage the encoding.
>
>
> The program can be that some of the comand can't execute to detect the
> encoding. I try to change this   export LC_CTYPE=$(locale -a|grep -i
> "utf[.]*8"|head -1); in the /usr/local/bin/apertium to put directly, but I
> can't get it. I think I have to change the c files. For example:
> utf_converter.cc
>

[.] is the same as \. in grep, ITYM:
grep -i utf.*8

> I give you to php file:
>
> <?
>
>
> $var=system("echo 'hola esto es una prueba ' | /usr/local/bin/apertium es-ca
> ");#
>
> echo $var;# you see the translation in the screen
>
>
> ?>
> or the perl file:
>

The shell used by 'system' in both has a different environment to your
login shell (and, possibly, to each other). You either need to change
the default shell environment for each, or explicitly set $LANG

$var=system("echo 'hola esto es una prueba ' | LANG=es_ES.UTF-8
/usr/local/bin/apertium es-ca");

...or set it directly in the apertium script.

>
> #!/usr/bin/perl
> # CGI MINIMO
>
> use CGI       qw(:standard      );
> use CGI::Carp qw(fatalsToBrowser);
>
> print
>     header,
>     start_html('CGI MINIMO'),
>     h1('CGI MINIMO'),
>     hr,
>     p('you have to see the translation in tradu.txt.'),
>     hr;
>
> my @parametros = param();
> foreach my $par ( @parametros ) {
>         print p($par);
>         print blockquote(param( $par ));
> }
> #system (" cd ../htdocs/buscador_oposiciones/");
> system (" (echo 'hola esto es una prueba ' | apertium-deshtml | apertium
> es-ca -u | apertium-rehtml) > tradu.txt ");# You need to give the right
> permission to create tradu.txt
>
> print end_html;
>




>
> I hope you can't understand me if you can ask me again.
>
>
> El 13 de febrero de 2011 18:27, Jimmy O'Regan <[email protected]> escribió:
>>
>> 2011/2/13 Mikel Forcada <[email protected]>:
>> > Julio,
>> > envío el mensaje a la lista apertium-stuff para ver si alguien puede
>> > responder a las preguntas técnicas mejor que yo...
>> >
>> > Apertium es software libre. Esto quiere decir que lo puede usar para lo
>> > que desee, tal como indica la licencia GPL que acompaña al software.
>> > Léala atentamente para estar más seguro.
>> >
>> > Saludos
>> >
>> >
>> > Mikel
>> >
>>
>>
>> [Apologies; I don't speak Spanish]
>>
>> > On 02/12/2011 10:58 PM, Julio wrote:
>> >> Hola Mikel L. Forcada encontre en proyecto apertium, el cuál he
>> >> instalado en una distribución Suse 11.2 a pesar de que no estaba
>> >> pensado para la configuración en si. Es decir, que esta pensado para
>> >> debian o ubuntu.
>> >>
>> >> El motivo es que me di cuenta que cuando iba instalar la última
>> >> versión de apertium 3.2 , me daba el error que no tenia la version
>> >> lttoolbox-3.1.0 instalada. La cuál ni si quiera esta en source forge,
>> >> porque tenéis la version lttoolbox-3.2.0 . Entonces, en vez de buscar
>> >> los archivos de la versión lttoolbox-3.1.0 cambie configure para que
>> >> admitiera la version 3.2.0. La instalación fue satisfactoria, por eso
>> >> deberías modificar para que los usuarios interesados puedan instalarlo
>> >> con la versión lttoolbox-3.2.0.
>> >>
>>
>> It seems to me that you didn't run ldconfig after you installed lttoolbox.
>>
>> >> También, aprovecho para preguntarte un problema que tengo sobre el
>> >> programa. Cuando ejecutó en la consola (echo "Hola esto es una prueba"
>> >> | apertium es-ca) el programa traduce correctamente. Pero cuando si
>> >> intenta lanzar por webmin ejecutando la shell, tiene problemas con
>> >> códificación sale esto ; #Aix? ?s una prova).
>> >>
>> >> He probado ejecutar en la shell desde php y perl con la función
>> >> correspondiente que llama a la shell (system) y me da el mismo error.
>> >> Aunque también he intentado guardar el resultado en fichero (echo
>> >> "Hola esto es una prueba" | apertium es-ca) > tradu.txt pero tampoco
>> >> ha funcionado.
>> >>
>>
>> This seems like you're using a non-UTF-8 locale: type 'echo $LANG' --
>> if the output doesn't end in '.UTF-8', you'll need to install a more
>> modern locale.
>>
>> >> Entonces el error de webmin esta justificado porque esta realizado en
>> >> perl sino me equivoco.
>> >>
>> >> Mi pregunta es ¿ Si tenéis el mismo problema con ubuntu o debian?. Si
>> >> es así, ¿Solucionarás este error en futura versiones?
>> >>
>> >> Por cierto, ¿Tenéis alguna limitación en el uso del programa?
>> >>
>> >> Te adjunto los fichero php y perl para que lo puedas ver, si quieres.
>> >>
>> >>
>> >> Un saludo:
>> >> Julio Morales
>> >
>> >
>> > --
>> > Mikel L. Forcada (http://www.dlsi.ua.es/~mlf/)
>> > Departament de Llenguatges i Sistemes Informàtics
>> > Universitat d'Alacant
>> > E-03071 Alacant, Spain
>> > Phone: +34 96 590 9776
>> > Fax: +34 96 590 9326
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio
>> > XE:
>> > Pinpoint memory and threading errors before they happen.
>> > Find and fix more than 250 security defects in the development cycle.
>> > Locate bottlenecks in serial and parallel code that limit performance.
>> > http://p.sf.net/sfu/intel-dev2devfeb
>> > _______________________________________________
>> > Apertium-stuff mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>> >
>>
>>
>>
>> --
>> <Leftmost> jimregan, that's because deep inside you, you are evil.
>> <Leftmost> Also not-so-deep inside you.
>
>



-- 
<Leftmost> jimregan, that's because deep inside you, you are evil.
<Leftmost> Also not-so-deep inside you.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to