* extras/hbvpdf/hbvpdf.hbx
! two more corrections
* contrib/gtwvg/tests/_dyndlgs.prg
* contrib/hbct/doc/en/finan.txt
* contrib/hbct/readme.txt
* contrib/hbct/tests/asciisum.prg
* contrib/hbct/tests/trig.prg
* contrib/hbfoxpro/dll.prg
* contrib/hbhttpd/core.prg
* contrib/hbhttpd/widgets.prg
* contrib/hbmisc/fcomma.prg
* contrib/hbmlzo/tests/test.prg
* contrib/hbmxml/tests/custom.prg
* contrib/hbmzip/readme.txt
* contrib/hbnf/nwuid.prg
* contrib/hbnf/vidcur.prg
* contrib/hbtip/client.prg
* contrib/hbwin/tests/olesrv1.prg
* contrib/hbwin/tests/testprn.prg
* contrib/xhb/cstruct.prg
* contrib/xhb/hjwindow.prg
* contrib/xhb/hterrsys.prg
* contrib/xhb/htjlist.prg
* contrib/xhb/htmutil.prg
* contrib/xhb/tests/decode.prg
* contrib/xhb/xhberr.prg
* doc/cmdline.txt
* doc/en/objfunc.txt
* doc/en/set.txt
* doc/en/string.txt
* doc/pragma.txt
* extras/gfspell/spell.prg
* extras/gtwvw/docs/gtwvw.txt
* extras/gtwvw/tests/wvwtest9.prg
* extras/hbvpdf/core.prg
* extras/hbvpdf/fonts.prg
* extras/hbvpdf/tests/pdf_demo.prg
* extras/httpsrv/cgifunc.prg
* extras/httpsrv/home/counter.html
* extras/httpsrv/home/testxmldb.html
* extras/httpsrv/session.prg
* extras/httpsrv/uhttpd.prg
* tests/base64.prg
* tests/boxtest.prg
* tests/db_brows.prg
* tests/ddate.prg
* tests/inherit.prg
* tests/langmsg.prg
* tests/mathtest.prg
* tests/memtst.prg
* tests/readhrb.prg
* tests/switch.prg
* tests/testsha2.prg
* tests/testwarn.prg
* tests/tstdbi.prg
* tests/utf8at.prg
* utils/hbtest/hbtest.prg
* utils/hbtest/rt_class.prg
* utils/hbtest/rt_date.prg
* utils/hbtest/rt_hvma.prg
* utils/hbtest/rt_math.prg
* utils/hbtest/rt_misc.prg
* utils/hbtest/rt_trans.prg
* website/news.html
* website/news1.html
* website/samples.html
* website/samples/arreval.html
* website/samples/codebl.prg.html
* website/samples/dates3.html
* website/samples/switch.prg.html
* website/samples/testcgi.prg.html
* website/samples/tstmacro.prg.html
* rerun case fixer script after applying
some fixes, and this time it run fully
automatically.
52 lines
2.3 KiB
Plaintext
52 lines
2.3 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/* hb_utf8At() / hb_utf8RAt() test
|
|
UTF8-aware hb_At()/hb_RAt() */
|
|
|
|
#include "simpleio.ch"
|
|
|
|
REQUEST HB_CODEPAGE_FR850
|
|
REQUEST HB_CODEPAGE_FRISO
|
|
|
|
PROCEDURE Main()
|
|
|
|
#define _UTF8_E_ACUTE hb_BChar( 0xC3 ) + hb_BChar( 0xA9 )
|
|
#define _UTF8_E_CIRCUMFLEX hb_BChar( 0xC3 ) + hb_BChar( 0xAA )
|
|
|
|
LOCAL u := "Une r" + _UTF8_E_CIRCUMFLEX + "ve est la moiti" + _UTF8_E_ACUTE + " d'une r" + _UTF8_E_ACUTE + "alit" + _UTF8_E_ACUTE + "."
|
|
LOCAL i := hb_Translate( u, "UTF8", "FRISO" )
|
|
LOCAL d := hb_Translate( u, "UTF8", "FR850" )
|
|
|
|
LOCAL uu := _UTF8_E_ACUTE
|
|
LOCAL ii := hb_Translate( uu, "UTF8", "FRISO" )
|
|
LOCAL dd := hb_Translate( uu, "UTF8", "FR850" )
|
|
|
|
LOCAL l := Len( uu ) + 2
|
|
|
|
? "ISO-8859-1 -", PadR( ii, l ), "=>", i
|
|
?
|
|
? "CP850 -", PadR( dd, l ), "=>", d
|
|
?
|
|
? "UTF-8 -", PadR( uu, l ), "=>", u
|
|
?
|
|
? At( ii, i ), RAt( ii, i ), "- ISO-8859-1 at/rat"
|
|
? hb_At( ii, i ), hb_RAt( ii, i ), "- ISO-8859-1 hb_at/rat"
|
|
? hb_utf8At( ii, i ), hb_utf8RAt( ii, i ), "- ISO-8859-1 hb_utf8at/rat"
|
|
? At( dd, d ), RAt( dd, d ), "- CP850 at/rat"
|
|
? hb_At( dd, d ), hb_RAt( dd, d ), "- CP850 hb_at/rat"
|
|
? hb_utf8At( dd, d ), hb_utf8RAt( dd, d ), "- CP850 hb_utf8at/rat"
|
|
? At( uu, u ), RAt( uu, u ), "- UTF-8 at/rat"
|
|
? hb_At( uu, u ), hb_RAt( uu, u ), "- UTF-8 hb_at/rat"
|
|
? hb_utf8At( uu, u ), hb_utf8RAt( uu, u ), "- UTF-8 hb_utf8at/rat"
|
|
?
|
|
? hb_At( ii, i, 33 ), hb_RAt( ii, i, 33 ), hb_At( ii, i, , 33 ), hb_RAt( ii, i, , 33 ), "- ISO-8859-1 hb_at/rat"
|
|
? hb_utf8At( ii, i, 33 ), hb_utf8RAt( ii, i, 33 ), hb_utf8At( ii, i, , 33 ), hb_utf8RAt( ii, i, , 33 ), "- ISO-8859-1 hb_utf8at/rat"
|
|
? hb_At( dd, d, 33 ), hb_RAt( dd, d, 33 ), hb_At( dd, d, , 33 ), hb_RAt( dd, d, , 33 ), "- CP850 hb_at/rat"
|
|
? hb_utf8At( dd, d, 33 ), hb_utf8RAt( dd, d, 33 ), hb_utf8At( dd, d, , 33 ), hb_utf8RAt( dd, d, , 33 ), "- CP850 hb_utf8at/rat"
|
|
? hb_At( uu, u, 33 ), hb_RAt( uu, u, 33 ), hb_At( uu, u, , 33 ), hb_RAt( uu, u, , 33 ), "- UTF-8 hb_at/rat"
|
|
? hb_utf8At( uu, u, 33 ), hb_utf8RAt( uu, u, 33 ), hb_utf8At( uu, u, , 33 ), hb_utf8RAt( uu, u, , 33 ), "- UTF-8 hb_utf8at/rat"
|
|
|
|
RETURN
|