Hi Leandro,

>> These are internal structures, so there if is any notion
>> of writing stable code I strongly suggest to not use
>> them directly at all.
> 
>> I think the bug here is that you can access these members
>> at all. IMO they should be protected like HB_ITEM members.
>> 
> 
> You must be right. The .C code was just an attempt to illustrate what we 
> thought that could help to find a solution if you guys at "Houston" agree 
> that "we have a problem" ;)
> 
> The real problem I want to ask you about is, shouldn't Upper() and Lower() 
> consider the selected codepage?  It is important (at least for latin codepage 
> users like PT850) to have case change functionality based upon the selected 
> codepage and not just the default codepage, because in our language we have 
> to use lots of accents. Upper() and Lower() prg level functions seems to have 
> been written to fullfill this need, but if they are then they are not working 
> well... :(

UPPER() and LOWER() are considering CP setting.

> <code>
> procedure main()
> REQUEST HB_LANG_PT
> REQUEST HB_CODEPAGE_PT850
> hb_CDPselect("PT850")
> ? upper("coração")
> quit
> </code>
> 
> This example shows "CORAþÒO", but shouldn't it show "CORAÇÃO"?

This is impossible to tell when pasted to an e-mail.

Anyhow I've checked it locally directly in the source 
and to me the PT850 looks alright.

Try to open src/codepage/cppt850.c with an editor 
which you can set to 850 CP, or your browser. Or 
do the same with above test after your write the 
result in a file instead of showing it on screen.

The problem is probably in your display or output 
settings.

Viktor

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to