Encoding of ADF Faces Pages
By Didier Laurent on Sep 17, 2009
I got several issues this week that had the same root cause though the symptoms were completely different.
The problem is related to the page encoding of the ADF Faces JSPX.
ADF Faces supports 'utf-8' only.
However, by default, the editor creates the pages with the 'windows-1252' encoding:
This leads to problems like:
- accented characters transformed to code representation during the Submit - see the discussion "Character encoding problem in ADF 11 app" in the OTN Forum
- Error: "The value is not a number" when using groupingUsed="true" with specific locale (French f.ex.)
To avoid these issues, you can edit your pages and change 'windows-1252' by 'utf-8'.
For the new pages, you can change the default to 'utf-8':
- select menu "Tools" -> "Preferences..."
- click "Environment"
- select "UTF-8" in the "Encoding" list.
The new pages will be created correctly now.
Note that as from JDeveloper 22.214.171.124.0 onwards, JDeveloper will use the encoding 'utf-8' (whatever the default encoding is) when ADF Faces technology is used.