Was a way for a few days (got around 70 more Harbour digest to read),
so I don't know if this is still relevant:

Zsolt Bartos-Elekes posted the following:
http://sourceforge.net/tracker/?func=detail&atid=100681&aid=2987157&group_id=681
------------------
Harbour version 2.0.0
gcc (Debian 4.3.2-1.1) 4.3.2
Debian GNU/Linux 5.0.4-amd64 (Lenny)
Linux 2.6.33.1 x86_64

The following program reads spaces into variables even if no keys are pressed if
code page != terminal code page:

REQUEST HB_LANG_HUISO
REQUEST HB_CODEPAGE_HUISO

REQUEST HB_LANG_HU852
REQUEST HB_CODEPAGE_HU852

HB_LANGSELECT("HU852")
HB_SETCODEPAGE("HU852")
HB_SETTERMCP("HUISO")

? "Language:           ",HB_LANGSELECT()
? "Code page:          ",HB_SETCODEPAGE()

clear gets

var1=space(20)
var2=space(20)

@ 5,0 say "var1" get var1
@ 6,0 say "var2" get var2

read

@ 8,0 say ""

? var1
? var2

The problem is with the src/codepage/uc*.c files,
most if not all of them map the code page's first character
(character code 0x00) to U+0x0020 (space).
Changing them to U+0x0000 resolves the problem.
------------------


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

Reply via email to