On Thu, 18 May 2017, Alex Strickland wrote:
Hi Alex,
> >False assumption gives false conclusions - Aristotle.
> As you say. Or more crudely: "Assumption is the mother of all f*ups".
;)
> But when does it as you say above "convert strings to UNICODE using
> CP437"? When I do a system call like FILE(str)? Is str converted
> from CP437 to unicode?
CP437 just like any other code page, i.e. CP1252 is array of Unicode
values indexed by unsigned character value in string.
> Perhaps I should try and move to UTF8? How would I do that? Something like:
>
> hb_cdpSelect("UTF8")?
Why? You only have to specify correct codepage. That's all.
CP1252 or CP850 in your case.
> hb_cdpUniID returns cp437 in the 3.0.1 version but I assume from
> what you say above that it is not relevant because Unicode calls are
> used.
It does not mean that you ever used character in CP437 encoding.
Probably you never used such character when you were using
national characters for west Europe languages. Just simply in 3.0.1
they were passed as you typed them. So they are and were probably
in CP1252 encoding.
> >But are you sure that you have characters encoded in CP437
> >in your source code and data tables?
> I will try and manually check.
Just simply try
? ASC( "ö" )
Then check corresponding Unicode character value in s_uniCodes
array in src/rtl/cdpapi.c (CP437) and in src/codepage/uc1252.c
(CP1252).
Finaly check what glyph is assigned to Unicode value you are using.
SVWIN internally uses CP1252 so it can resolve your problem but
you should rather use sth like "ENWIN" to not change colattion
order, i.e. code below defines such codepage:
best regards,
Przemek
REQUEST HB_CODEPAGE_ENWIN
PROCEDURE Main()
Set( _SET_CODEPAGE, "ENWIN" )
? Set( _SET_CODEPAGE ), hb_cdpUniID( Set( _SET_CODEPAGE ) )
? "Abschöpfung.jpg:", file( "Abschöpfung.jpg" )
RETURN
#pragma begindump
#define HB_CP_ID ENWIN
#define HB_CP_INFO "English CP-1252"
#define HB_CP_UNITB HB_UNITB_1252
#define HB_CP_ACSORT HB_CDP_ACSORT_NONE
#define HB_CP_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define HB_CP_LOWER "abcdefghijklmnopqrstuvwxyz"
#define HB_CP_UTF8
#include "hbcdpreg.h" /* include CP registration code */
#pragma enddump