Hello everybody,
I had a problem with our system, because of the code page, what is written in the database, what is displayed, etc...
And during all my test/java development in java and what was going on in prod, I found something very disturbing... and I wanted to know if you have the same experience, and what could be a solution...
Here is what I've done (AIX and Linux only)
- DB2 10.5, database created in ISO-8859-15 codepage, like we have.
- Install CMOD V8.4, create the tables/indexes, load some documents
- Upgrade to V8.5 or V9.5, doesn't matter.
- Add the ARS_ORIGINAL_CODEPAGE=923 as requested.
Here is what is strange, if I change the shell "locale" to UTF-8 when running arsdb -u for the upgrade process... then, I am requested to change ARS_ORIGINAL_CODEPAGE to the value 1208.
If I use the normal ISO-8859-15 code page for the shell, then ARS_ORIGINAL_CODEPAGE should be 923.
I play around to use other code (that was installed in my AIX/Linux) and guess what... the value of ARS_ORIGINAL_CODEPAGE is always dependant on the locale of the shell.
This has cause me a shock, and after discovering that, I could finally solve a bug I had for many years, that I could never reproduced. When I have my dev environment with the same shell locale as in production, then I could reproduce the problem and solve it.
This brings in my mind many questions... why does CMOD relies on the shell to determine the codepage to use?
This is something that can change at any time, for any reasons. Some will put UTF-8, some other to C, so other to something else.
Maybe you migrate from one server to another, and the old one was per default in ISO-8859-1 and the new one is per default configured with UTF-8...
Then Boom, you server will not react as expected, you have strange chars in your clients instead of your üöéàèôû...
Am I dreaming and imagining things? If that is the case, it means that we must be really careful on how to start CMOD, that it use the correct codepage every time, and that the combination DB codepage and shell codepage that starts "arssockd/arsobjd" must be in sync at all time.
What are you thought on that??