Well, for example a dropdown list option in my launch-page has value="E-modulus at 23°C".
The degree symbol in the browser is encoded in utf-8 as C2 B0.
The values in that dropdown list (in the browser) are the result of calling the adhoc-fex via an xmlHTTP POST-request with a snippet of DM/FOCUS code, returned as PCHOLD FORMAT XML:
Form Data (decoded):
ST : FOC_NONE
SS : FOC_NONE
COA : FOC_NONE
START_DATE : FOC_NONE
END_DATE : FOC_NONE
PG : FOC_NONE
IBIF_adhocfex : SET ONLINE-FMT = XML
SET PANEL = 9000
-SET &COA2 = IF &COA EQ FOC_NONE OR '' THEN 'no' ELSE &COA;
TABLE FILE UNI00008H_PARAMETERS
BY PA
BY PA_DESCRIPTION
WHERE ST EQ '&ST';
WHERE SS EQ &SS;
WHERE ('&COA2' EQ 'yes' AND PG EQ 'CoA') OR ('&COA2' NE 'yes' AND PG NE 'CoA');
WHERE END_DATE FROM '&START_DATE' TO '&END_DATE';
WHERE PG EQ '&PG';
WHERE PA NE '/';
END
In Dev Studio I edit the fex that gets called by the HTML form. If I paste a degree symbol in there it ends up as B0, not C2 B0. Apparently Dev Studio uses latin1 for encoding.
There doesn't appear to be a method to change the encoding in there so that the characters in both environments at least look the same. That's a bit problematic, but if you're aware of that you can work around it.
I ended up opening the fex on the remote file system in a real editor, in which I could choose in what encoding (utf-8) to edit the file.
In the next step the data-value (as selected in the dropdown) is used in the WHERE-clause of an SQL query back to Oracle, and it turns out that the value doesn't match the same value in Oracle any more.
It would appear that something along the way isn't transforming the encoding appropriately. That's the real problem.
The data went through this route:
Oracle -> WebFOCUS server -> WebFOCUS client -> IIS7 -> Client browser -> WebFOCUS server -> Oracle
I'm fairly certain this must be a bug in WebFOCUS somewhere, because:
- The browser tells what encoding its using (utf-8) - verified
- The webFOCUS server should know its own encoding
- The webFOCUS server should pass its encoding information on to the database session
- Oracle converts the data to its local encoding
If all that happens correctly, the value would have been the same at the start and the end.
Now I am perfectly aware that not all characters in utf-8 can be converted between all character sets, but I don't think that's the case for a character as common as the degree symbol. That should have been exactly the same once it got back to Oracle.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :