On Thu, 31 Dec 2009, Lorenzo Fiorini wrote: Hi,
> I'm moving from ITISB to ITISO to support West European languages and > I'm trying to get Euro symbol working on screen, in reports and in > file exports. Euro symbol is seldom used but it is on the keyboards so > users expect to get it. Euro sign has unicode value: U+20AC In Windows CP-125[02345678], IBM CP-874 and our modified ISO-8859-1B it's at possition 128 so if you use one of the above CPs then: ? CHR( 128 ) should show euro sign. In Windows CP-1251 (Cyrillic) it's at position 136 so you have to use: ? CHR( 136 ) In ISO-8859-7, ISO-8859-15 and ISO-8859-16 it's at position 164. i.e.: ? CHR( 164 ) U+20AC is not present in other Unicode tables so if you use other CP then probably it will not work as you want though due to result of repeated or ignored wrong translations in some configurations it will be shown on the screen or read from keyboard correctly. Anyhow such tricks are unimportant for us because they can stop to work at any moment so cannot be used in production environment. If you do not know exact euro sign encoding for given CP then you can try to define it using Unicode value, i.e.: #define EURO_SIGN HB_UTF8TOSTR( HB_UTF8ASC( 0x20AC ) ) ? EURO_SIGN > I've done few tests changing gtxwc encoding and cpitiso.c to 8859-15 > but without success. Please leave gtxwc working with Unicode fonts (iso10646-1). Otherwise it's possible that you mixed encoding so the results will be unpredictable because they will depend on character lost conversions in 3-rd party code. Even if you reach some expected effects then it's possible that it's not replicable on other machine which uses only one slightly different component and you will not know what is wrong and why. Change only encoding in Harbour CP (i.e. change unicode table in cpitiso.c and set "ITISO" as HVM and GT CP in your program. > Using linux/gtxwc I can type it, it shows like a small square but if I > export to a pdf ( using hbvpdf ) or to an rtf using rtf/ansi charset > it is showed correctly. > However if I import the dbf in an OpenOffice SpreadSheet using > ISO8859-15 encoding it shows like a square and I'm still trying to get > it out using HP PCL codes. > Ideas? Looks like a classic example of problems created by different encodings and wrong translations. Finlay you created combination where repeated wrong or ignored transformation give expected results. Without knowledge what _exactly_ you have modified in Harbour what _exactly_ you set as HVM and GT CPs in your programs and how it's configured your system (used locale) I cannot give you precise answer what has happened. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
