Problem to be examined by those who must use UTF8 with Gambas

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem to be examined by those who must use UTF8 with Gambas

Fernando Cabral
I've been testing my new toy with every large and small text I can put my
hands on. The fact is, I have had surprise after surprise. I've just found
that when I read a text that contains "À" (that's an A with a grave accent
(`A) -- or  a backward acute accent for those who are not familiar with
diacritics).

Well, I can't display it if I load it into a TextArea.text. Nothing shows.
I mean, NOTHING. That is, I have a blank screen. If I bring it to lowercase
(à or `a) it will show up (in lowercase) with the rest of the text.

So, "`A" (coded as  "\xC3\x80") will prevent the displaying of any string.
Nevertheless, if I just try to display "Some text plus  À and some text
more" it will work.

Now, if I take the original text and do:

*  RawText = RegExp.Replace(RawText, "À", "à")*

yep! it does work.
But if I translate it back with

*  RawText = RegExp.Replace(RawText, "à", "À")*

It does not work anymore.

But if I do

*RawText = RawText & "À"*

And RawText did not contain "À"  before, then it will be displayed.

Amazing.

Any ideas about why this happens?

Regards

- fernando



--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: [hidden email]
Facebook: [hidden email]
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem to be examined by those who must use UTF8 with Gambas

Jussi Lahtinen
I don't quite get your description of the problem. It seems self
contradictory. I mean this part:




*'So, "`A" (coded as  "\xC3\x80") will prevent the displaying of any
string. Nevertheless, if I just try to display "Some text plus  À and some
text more" it will work.'*
So, what exactly does not work then?
Are you using ascii functions for UTF-8 at some point? I think we need to
see your code to understand the issue.



Jussi



On Sat, Jul 1, 2017 at 8:01 PM, Fernando Cabral <
[hidden email]> wrote:

> I've been testing my new toy with every large and small text I can put my
> hands on. The fact is, I have had surprise after surprise. I've just found
> that when I read a text that contains "À" (that's an A with a grave accent
> (`A) -- or  a backward acute accent for those who are not familiar with
> diacritics).
>
> Well, I can't display it if I load it into a TextArea.text. Nothing shows.
> I mean, NOTHING. That is, I have a blank screen. If I bring it to lowercase
> (à or `a) it will show up (in lowercase) with the rest of the text.
>
> So, "`A" (coded as  "\xC3\x80") will prevent the displaying of any string.
> Nevertheless, if I just try to display "Some text plus  À and some text
> more" it will work.
>
> Now, if I take the original text and do:
>
> *  RawText = RegExp.Replace(RawText, "À", "à")*
>
> yep! it does work.
> But if I translate it back with
>
> *  RawText = RegExp.Replace(RawText, "à", "À")*
>
> It does not work anymore.
>
> But if I do
>
> *RawText = RawText & "À"*
>
> And RawText did not contain "À"  before, then it will be displayed.
>
> Amazing.
>
> Any ideas about why this happens?
>
> Regards
>
> - fernando
>
>
>
> --
> Fernando Cabral
> Blogue: http://fernandocabral.org
> Twitter: http://twitter.com/fjcabral
> e-mail: [hidden email]
> Facebook: [hidden email]
> Telegram: +55 (37) 99988-8868
> Wickr ID: fernandocabral
> WhatsApp: +55 (37) 99988-8868
> Skype:  fernandojosecabral
> Telefone fixo: +55 (37) 3521-2183
> Telefone celular: +55 (37) 99988-8868
>
> Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
> nenhum político ou cientista poderá se gabar de nada.
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: Problem to be examined by those who must use UTF8 with Gambas

Jussi Lahtinen
---------- Forwarded message ----------
From: Benoît Minisini <[hidden email]>
Date: Sun, Jul 2, 2017 at 1:14 AM
Subject: Re: [Gambas-user] Problem to be examined by those who must use
UTF8 with Gambas
To: Jussi Lahtinen <[hidden email]>, [hidden email]


Please send that to the mailing-list.

Regards,

Le 02/07/2017 à 00:10, Jussi Lahtinen a écrit :

> OK, this seems to be bug in GTK+ component!
> Go to; Project --> Properties --> Components, and change gb.gui to
> gb.gui.qt, then everything will work as expected. Or you need to wait for
> fix.
>
>
> Jussi
>
>
>
> On Sat, Jul 1, 2017 at 11:34 PM, Fernando Cabral <
> [hidden email] <mailto:[hidden email]>> wrote:
>
>     2017-07-01 16:15 GMT-03:00 Jussi Lahtinen <[hidden email]
>     <mailto:[hidden email]>>:
>
>         I don't quite get your description of the problem. It seems self
>         contradictory. I mean this part:
>         /
>         /
>
>     Perhaps It should sound contradictory. That's because if I write
>     directly to a TextArea.text from
>     inside the program, it will show "À" correctly. Nevertheless, if I
>     read the same string from a file read into a variable and then try
>     to display it... it does not work.
>
>     > Are you using ascii functions for UTF-8 at some point?
>
>     I only use ascii functions where there are no UTF-8 functions. For
>     instance, split().
>
>     > I think we need to see your code to understand the issue.
>
>     I have attached a text file (ODT) as well as the code itself. Note
>     that, in order to run the code you will have to have unoconv installed.
>
>     If you comment the two lines bellow, the code will not work.
>
>     * RawText = RegExp.Replace(RawText, "À", "à")
>       RawText = RegExp.Replace(RawText, "Ó", "ó")
>     *
>
>     This happens because for some mysterious reason, the QT library
>     seems to get confused
>     with *À* and *Ó*. But not always!*
>     *
>
>     Jussi
>
>
>
>     On Sat, Jul 1, 2017 at 8:01 PM, Fernando Cabral
>     <[hidden email] <mailto:[hidden email]>>
>
>     wrote:
>
>         I've been testing my new toy with every large and small text I
>         can put my
>         hands on. The fact is, I have had surprise after surprise. I've
>         just found
>         that when I read a text that contains "À" (that's an A with a
>         grave accent
>         (`A) -- or  a backward acute accent for those who are not
>         familiar with
>         diacritics).
>
>         Well, I can't display it if I load it into a TextArea.text.
>         Nothing shows.
>         I mean, NOTHING. That is, I have a blank screen. If I bring it
>         to lowercase
>         (à or `a) it will show up (in lowercase) with the rest of the text.
>
>         So, "`A" (coded as  "\xC3\x80") will prevent the displaying of
>         any string.
>         Nevertheless, if I just try to display "Some text plus  À and
>         some text
>         more" it will work.
>
>         Now, if I take the original text and do:
>
>         *  RawText = RegExp.Replace(RawText, "À", "à")*
>
>         yep! it does work.
>         But if I translate it back with
>
>         *  RawText = RegExp.Replace(RawText, "à", "À")*
>
>         It does not work anymore.
>
>         But if I do
>
>         *RawText = RawText & "À"*
>
>         And RawText did not contain "À"  before, then it will be displayed.
>
>         Amazing.
>
>         Any ideas about why this happens?
>
>         Regards
>
>         - fernando
>
>
>
>         --
>         Fernando Cabral
>         Blogue: http://fernandocabral.org
>         Twitter: http://twitter.com/fjcabral
>         e-mail <http://twitter.com/fjcabrale-mail>:
>         [hidden email] <mailto:[hidden email]>
>         Facebook: [hidden email] <mailto:[hidden email]>
>         Telegram: +55 (37) 99988-8868 <tel:%2B55%20%2837%29%2099988-8868>
>         Wickr ID: fernandocabral
>         WhatsApp: +55 (37) 99988-8868 <tel:%2B55%20%2837%29%2099988-8868>
>         Skype:  fernandojosecabral
>         Telefone fixo: +55 (37) 3521-2183 <tel:%2B55%20%2837%29%203521-2
> 183>
>         Telefone celular: +55 (37) 99988-8868
>         <tel:%2B55%20%2837%29%2099988-8868>
>
>         Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
>         nenhum político ou cientista poderá se gabar de nada.
>         ------------------------------------------------------------
> ------------------
>         Check out the vibrant tech community on one of the world's most
>         engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>         _______________________________________________
>         Gambas-user mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         https://lists.sourceforge.net/lists/listinfo/gambas-user
>         <https://lists.sourceforge.net/lists/listinfo/gambas-user>
>
>
>
>
>
>     --     Fernando Cabral
>     Blogue: http://fernandocabral.org
>     Twitter: http://twitter.com/fjcabral
>     e-mail: [hidden email]
>     <mailto:[hidden email]>
>     Facebook: [hidden email] <mailto:[hidden email]>
>     Telegram: +55 (37) 99988-8868 <tel:+55%2037%2099988-8868>
>     Wickr ID: fernandocabral
>     WhatsApp: +55 (37) 99988-8868 <tel:+55%2037%2099988-8868>
>     Skype:  fernandojosecabral
>     Telefone fixo: +55 (37) 3521-2183 <tel:+55%2037%203521-2183>
>     Telefone celular: +55 (37) 99988-8868 <tel:+55%2037%2099988-8868>
>
>     Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
>     nenhum político ou cientista poderá se gabar de nada.
>
>
>

--
Benoît Minisini
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: Problem to be examined by those who must use UTF8 with Gambas

Fernando Cabral
In reply to this post by Jussi Lahtinen
---------- Forwarded message ----------
From: Fernando Cabral <[hidden email]>
Date: 2017-07-01 17:34 GMT-03:00
Subject: Re: [Gambas-user] Problem to be examined by those who must use
UTF8 with Gambas
To: Jussi Lahtinen <[hidden email]>


2017-07-01 16:15 GMT-03:00 Jussi Lahtinen <[hidden email]>:

> I don't quite get your description of the problem. It seems self
> contradictory. I mean this part:
>
> Perhaps It should sound contradictory. That's because if I write directly
to a TextArea.text from
inside the program, it will show "À" correctly. Nevertheless, if I read the
same string from a file read into a variable and then try to display it...
it does not work.

> Are you using ascii functions for UTF-8 at some point?

I only use ascii functions where there are no UTF-8 functions. For
instance, split().

> I think we need to see your code to understand the issue.

I have attached a text file (ODT) as well as the code itself. Note that, in
order to run the code you will have to have unoconv installed.

If you comment the two lines bellow, the code will not work.



* RawText = RegExp.Replace(RawText, "À", "à") RawText =
RegExp.Replace(RawText, "Ó", "ó")*

This happens because for some mysterious reason, the QT library seems to
get confused
with *À* and *Ó*. But not always!

Jussi



On Sat, Jul 1, 2017 at 8:01 PM, Fernando Cabral <
[hidden email]> wrote:

> I've been testing my new toy with every large and small text I can put my
> hands on. The fact is, I have had surprise after surprise. I've just found
> that when I read a text that contains "À" (that's an A with a grave accent
> (`A) -- or  a backward acute accent for those who are not familiar with
> diacritics).
>
> Well, I can't display it if I load it into a TextArea.text. Nothing shows.
> I mean, NOTHING. That is, I have a blank screen. If I bring it to lowercase
> (à or `a) it will show up (in lowercase) with the rest of the text.
>
> So, "`A" (coded as  "\xC3\x80") will prevent the displaying of any string.
> Nevertheless, if I just try to display "Some text plus  À and some text
> more" it will work.
>
> Now, if I take the original text and do:
>
> *  RawText = RegExp.Replace(RawText, "À", "à")*
>
> yep! it does work.
> But if I translate it back with
>
> *  RawText = RegExp.Replace(RawText, "à", "À")*
>
> It does not work anymore.
>
> But if I do
>
> *RawText = RawText & "À"*
>
> And RawText did not contain "À"  before, then it will be displayed.
>
> Amazing.
>
> Any ideas about why this happens?
>
> Regards
>
> - fernando
>
>
>
> --
> Fernando Cabral
> Blogue: http://fernandocabral.org
> Twitter: http://twitter.com/fjcabral
> e-mail <http://twitter.com/fjcabrale-mail>: [hidden email]
> Facebook: [hidden email]
> Telegram: +55 (37) 99988-8868
> Wickr ID: fernandocabral
> WhatsApp: +55 (37) 99988-8868
> Skype:  fernandojosecabral
> Telefone fixo: +55 (37) 3521-2183
> Telefone celular: +55 (37) 99988-8868
>
> Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
> nenhum político ou cientista poderá se gabar de nada.
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: [hidden email]
Facebook: [hidden email]
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.




--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: [hidden email]
Facebook: [hidden email]
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Test.odt (13K) Download Attachment
TamPalavras-0.0.1033.tar.gz (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: Problem to be examined by those who must use UTF8 with Gambas

PICCORO McKAY Lenz
In reply to this post by Jussi Lahtinen
2017-07-01 18:29 GMT-04:30 Jussi Lahtinen <[hidden email]>:

> Please send that to the mailing-list.
>
in a forum its easy to the users, only click to the "reoly" button..

but due gambas-users its a mail list, its a compĺication, need to edit the
subject, the Remitent, etc.. so this king of errors/mistakes its a
common...

and its bed indexed by google so find a solution in the web without have a
subscription to the mail list its a pain..


>
> Regards,
>
> Le 02/07/2017 à 00:10, Jussi Lahtinen a écrit :
>
> > OK, this seems to be bug in GTK+ component!
> > Go to; Project --> Properties --> Components, and change gb.gui to
> > gb.gui.qt, then everything will work as expected. Or you need to wait for
> > fix.
> >
> >
> > Jussi
> >
> >
> >
> > On Sat, Jul 1, 2017 at 11:34 PM, Fernando Cabral <
> > [hidden email] <mailto:[hidden email]>>
> wrote:
> >
> >     2017-07-01 16:15 GMT-03:00 Jussi Lahtinen <[hidden email]
> >     <mailto:[hidden email]>>:
> >
> >         I don't quite get your description of the problem. It seems self
> >         contradictory. I mean this part:
> >         /
> >         /
> >
> >     Perhaps It should sound contradictory. That's because if I write
> >     directly to a TextArea.text from
> >     inside the program, it will show "À" correctly. Nevertheless, if I
> >     read the same string from a file read into a variable and then try
> >     to display it... it does not work.
> >
> >     > Are you using ascii functions for UTF-8 at some point?
> >
> >     I only use ascii functions where there are no UTF-8 functions. For
> >     instance, split().
> >
> >     > I think we need to see your code to understand the issue.
> >
> >     I have attached a text file (ODT) as well as the code itself. Note
> >     that, in order to run the code you will have to have unoconv
> installed.
> >
> >     If you comment the two lines bellow, the code will not work.
> >
> >     * RawText = RegExp.Replace(RawText, "À", "à")
> >       RawText = RegExp.Replace(RawText, "Ó", "ó")
> >     *
> >
> >     This happens because for some mysterious reason, the QT library
> >     seems to get confused
> >     with *À* and *Ó*. But not always!*
> >     *
> >
> >     Jussi
> >
> >
> >
> >     On Sat, Jul 1, 2017 at 8:01 PM, Fernando Cabral
> >     <[hidden email] <mailto:[hidden email]>>
> >
> >     wrote:
> >
> >         I've been testing my new toy with every large and small text I
> >         can put my
> >         hands on. The fact is, I have had surprise after surprise. I've
> >         just found
> >         that when I read a text that contains "À" (that's an A with a
> >         grave accent
> >         (`A) -- or  a backward acute accent for those who are not
> >         familiar with
> >         diacritics).
> >
> >         Well, I can't display it if I load it into a TextArea.text.
> >         Nothing shows.
> >         I mean, NOTHING. That is, I have a blank screen. If I bring it
> >         to lowercase
> >         (à or `a) it will show up (in lowercase) with the rest of the
> text.
> >
> >         So, "`A" (coded as  "\xC3\x80") will prevent the displaying of
> >         any string.
> >         Nevertheless, if I just try to display "Some text plus  À and
> >         some text
> >         more" it will work.
> >
> >         Now, if I take the original text and do:
> >
> >         *  RawText = RegExp.Replace(RawText, "À", "à")*
> >
> >         yep! it does work.
> >         But if I translate it back with
> >
> >         *  RawText = RegExp.Replace(RawText, "à", "À")*
> >
> >         It does not work anymore.
> >
> >         But if I do
> >
> >         *RawText = RawText & "À"*
> >
> >         And RawText did not contain "À"  before, then it will be
> displayed.
> >
> >         Amazing.
> >
> >         Any ideas about why this happens?
> >
> >         Regards
> >
> >         - fernando
> >
> >
> >
> >         --
> >         Fernando Cabral
> >         Blogue: http://fernandocabral.org
> >         Twitter: http://twitter.com/fjcabral
> >         e-mail <http://twitter.com/fjcabrale-mail>:
> >         [hidden email] <mailto:fernandojosecabral@
> gmail.com>
> >         Facebook: [hidden email] <mailto:[hidden email]>
> >         Telegram: +55 (37) 99988-8868 <tel:%2B55%20%2837%29%2099988-
> 8868>
> >         Wickr ID: fernandocabral
> >         WhatsApp: +55 (37) 99988-8868 <tel:%2B55%20%2837%29%2099988-
> 8868>
> >         Skype:  fernandojosecabral
> >         Telefone fixo: +55 (37) 3521-2183 <tel:%2B55%20%2837%29%203521-2
> > 183>
> >         Telefone celular: +55 (37) 99988-8868
> >         <tel:%2B55%20%2837%29%2099988-8868>
> >
> >         Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
> >         nenhum político ou cientista poderá se gabar de nada.
> >         ------------------------------------------------------------
> > ------------------
> >         Check out the vibrant tech community on one of the world's most
> >         engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >         _______________________________________________
> >         Gambas-user mailing list
> >         [hidden email]
> >         <mailto:[hidden email]>
> >         https://lists.sourceforge.net/lists/listinfo/gambas-user
> >         <https://lists.sourceforge.net/lists/listinfo/gambas-user>
> >
> >
> >
> >
> >
> >     --     Fernando Cabral
> >     Blogue: http://fernandocabral.org
> >     Twitter: http://twitter.com/fjcabral
> >     e-mail: [hidden email]
> >     <mailto:[hidden email]>
> >     Facebook: [hidden email] <mailto:[hidden email]>
> >     Telegram: +55 (37) 99988-8868 <tel:+55%2037%2099988-8868>
> >     Wickr ID: fernandocabral
> >     WhatsApp: +55 (37) 99988-8868 <tel:+55%2037%2099988-8868>
> >     Skype:  fernandojosecabral
> >     Telefone fixo: +55 (37) 3521-2183 <tel:+55%2037%203521-2183>
> >     Telefone celular: +55 (37) 99988-8868 <tel:+55%2037%2099988-8868>
> >
> >     Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
> >     nenhum político ou cientista poderá se gabar de nada.
> >
> >
> >
>
> --
> Benoît Minisini
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: Problem to be examined by those who must use UTF8 with Gambas

gambas-user mailing list
In reply to this post by Fernando Cabral
Le 02/07/2017 à 01:12, Fernando Cabral a écrit :

> ---------- Forwarded message ----------
> From: Fernando Cabral <[hidden email]>
> Date: 2017-07-01 17:34 GMT-03:00
> Subject: Re: [Gambas-user] Problem to be examined by those who must use
> UTF8 with Gambas
> To: Jussi Lahtinen <[hidden email]>
>
>
> 2017-07-01 16:15 GMT-03:00 Jussi Lahtinen <[hidden email]>:
>
>> I don't quite get your description of the problem. It seems self
>> contradictory. I mean this part:
>>
>> Perhaps It should sound contradictory. That's because if I write directly
> to a TextArea.text from
> inside the program, it will show "À" correctly. Nevertheless, if I read the
> same string from a file read into a variable and then try to display it...
> it does not work.
>
>> Are you using ascii functions for UTF-8 at some point?
>
> I only use ascii functions where there are no UTF-8 functions. For
> instance, split().
>
>> I think we need to see your code to understand the issue.
>
> I have attached a text file (ODT) as well as the code itself. Note that, in
> order to run the code you will have to have unoconv installed.
>
> If you comment the two lines bellow, the code will not work.
>
>
>
> * RawText = RegExp.Replace(RawText, "À", "à") RawText =
> RegExp.Replace(RawText, "Ó", "ó")*
>
> This happens because for some mysterious reason, the QT library seems to
> get confused
> with *À* and *Ó*. But not always!
>
> Jussi
>

Not mysterious: you are using UTF-8 separators with Split(), whereas
Split() only deals with ASCII strings. Consequently, the resulting
MatchedWords array gets incorrect UTF-8 strings.

If you have took the time to just trace your program between line #54
and line #60 and watch the MatchedWords array, you would have seen the
problem.

Regards,

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...