French collation

French collation

Postby Badara Thiam » Thu Jun 26, 2008 5:46 pm

Hello EveryBody

I use since yesterday the last upgrade of FWH.
Compile with Harbour and Borland.

Explanation : in french language, we have many
possibles signs on letters : a "e" can also be "è",
or "é", or "ê", or others... This is not simple
to learn French because this (and not only).

The french collation provided by C.A. Nantucket Clipper
is useful for the Clipper function named UPPER().

With Clipper :
UPPER("ê") = "E"
UPPER("à") = "A"

This work perfectly with Fivewin for Clipper,
because UPPER() is a Clipper function.

But this not work with Harbour.
Is existing a way to correct this ?
I not use ADS for the moment in my tests.

--
A bientôt mes amis,
Best Regards my friends,
Saludos mi amigos
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

UPPER() bug with french language ?

Postby Badara Thiam » Fri Jun 27, 2008 7:46 am

Good morning,

With these command lines, there is no change.

REQUEST HB_LANG_FR
REQUEST HB_CODEPAGE_FR

HB_LangSelect("FR")
HB_SetCodePage("FR")
SET(_SET_LANGUAGE, "FR")

UPPER() not work with Harbour like with Clipper.

Is xHarbour different on this ?

Thanks for your help, this is a very hard
compatibility problem.
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby James Bott » Fri Jun 27, 2008 5:33 pm

Badara,

I think you need to post this on the Harbour newsgroup.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Badara Thiam » Mon Jun 30, 2008 7:28 am

James,

This remember me a similar problem with ASC()
fews years ago. I hope Harbour developpers
want to give full access to french community.

Thank you


James Bott wrote:I think you need to post this on the Harbour newsgroup.

Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Enrico Maria Giordano » Mon Jun 30, 2008 9:36 am

You don't need access to the developer's mailing-list. comp.lang.xharbour is the official and access-free xHarbour newsgroup.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Badara Thiam » Mon Jun 30, 2008 2:04 pm

Hello Enrico,

Thanks for your answer.
After your message, i see another message on xHarbour
forum, where the author gives a sample
code to compile with Clipper to create the list of
the letters to incorporate into xHarbour.

I do, and here is the result (letters.out)

Code: Select all  Expand view  RUN
AAAAABCDEEEEEFGHIIIIIJKLMNOOOOOPQRSTUUUUUVWXYZ
aáàâäbcdeéèêëfghiíìîïjklmnoóòôöpqrstuúùûüvwxyz


Can you incorporate it into the french collation of xHarbour/Harbour
and give me the files changed, please ?
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Enrico Maria Giordano » Mon Jun 30, 2008 2:53 pm

Sorry, I don't know how to do it. Please ask in comp.lang.xharbour.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Badara Thiam » Tue Jul 01, 2008 8:49 am

Enrico Maria Giordano wrote:Sorry, I don't know how to do it. Please ask in comp.lang.xharbour.

EMG


I do this yesterday. Now i wait. Since 3 years.
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby James Bott » Tue Jul 01, 2008 4:40 pm

Code: Select all  Expand view  RUN
/*
Purpose: Converts French characters to upper case for sorting. Also works with English.
Date   : 7/1/2008 9:22AM
Author : James Bott
Note   : Harbour doesn't handle this with Upper() like Clipper did.
         Use only for sorting and indexing.
         Does not convert lower case French characters to upper case French characters.
*/

/*
AAAAABCDEEEEEFGHIIIIIJKLMNOOOOOPQRSTUUUUUVWXYZ
aáàâäbcdeéèêëfghiíìîïjklmnoóòôöpqrstuúùûüvwxyz
*/

function main()
   local cTest:="aáàâäbcdeéèêëfghiíìîïjklmnoóòôöpqrstuúùûüvwxyz1234-+)*"

   msgInfo( fupper( cTest ) )

return nil


function fupper( cString )
   local cFrom:="aáàâäbcdeéèêëfghiíìîïjklmnoóòôöpqrstuúùûüvwxyz"
   local cTo:="AAAAABCDEEEEEFGHIIIIIJKLMNOOOOOPQRSTUUUUUVWXYZ"
   local i:=0, cSearch:="", cReplace:="", nLoc:=0
   for i = 1 to len( cString )
      cSearch:= substr( cString, i, 1 )
      nLoc:= at( cSearch, cFrom )
      if nLoc > 0
         cReplace:= substr( cTo, nLoc, 1 )
         cString:= strtran( cString, cSearch, cReplace )
      endif
   next
return cString

// eof
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Badara Thiam » Tue Jul 01, 2008 7:04 pm

James,

Thank you, but i have my own function
named MAJ(), for Majuscule (Upper, in french).

The problem is : why UPPER() is a reserved word ?
Why it is not possible to create our own function
UPPER(), named UPPER() ?

Because this is an internal function, reconized
by the rdd (ADS for example) like an internal
command, when she is in an index key.
What append if the RDD support only internal
functions (not end user functions) ?
It would be very nice to include it in [x]Harbour,
not ?

And what can we make, with the thirds party functions,
without source code, who contains UPPER() ?
This is a patch, for bicycle. Only those who look
your message can solve it.
How many times you must repeat this ?

Sorry, this is not a good way to work efficient.
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France

Postby Antonio Linares » Tue Jul 01, 2008 7:19 pm

Badara,

Some functions are reserved names in Harbour/xHarbour and can't be changed. Any how, you can always modify Harbour/xHarbour source code and build it yourself.

Its quite simple. If you have any troubles, we can help you with it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Tue Jul 01, 2008 7:20 pm

In fact you could modify the english collation (default) and place yours, so there is no need to call those functions from your code :-)

But as Enrico has suggested, the best way is to report it in the xHarbour newsgroup and get it properly fixed.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Badara Thiam » Wed Jul 02, 2008 12:08 pm

Hello Antonio,

Antonio Linares wrote:Badara,

Some functions are reserved names in Harbour/xHarbour and can't be changed. Any how, you can always modify Harbour/xHarbour source code and build it yourself.

Its quite simple. If you have any troubles, we can help you with it.


Thank you to your answer. I will try to report
all problems encountered, to help you to resolve
them for all others users, in one time, so you will be
very quiet after. When an user of my softs ask me,
i answer him, and after, when it's possible, i seek
to find the solution for the next users, in order to
do than these users have never to ask me any question
about. This is to help us, an also to be quite quiet...

There is a problem with the source code
of [x]Harbour, it is not included in the Harbour pack
provided in the Fivetech Download zone.

I have just the directories bin, include, lib and tests,
for Harbour and for xHarbour. The builds of Harbour
are dated of 01/12/2007 and those of xHarbour are dated
of 14/05/2008.

I don't know what [x]Harbour source i can download
with the last FWH to be compatible with.
This is a labyrinth for a C novice like me.
English is not my mother language.

Sincerely.
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
 
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests