=?ISO-8859-1?Q?Can_not_Search_for_Accent_chara?= =?ISO-8859-1?Q?cters_like_-_Caf=E8_/caf=E9_Informix?=
Posted in 2004
Topics: Stored Procedures & SPL, Platform-Specific Issues, Internationalization & Character Sets
Hi All, We have a problem in searching accent characters like Caf' in the database. We r running Informix 9.21 on Solaris, webserevr is Tomcat. We do not store any special charactes like spanish,turkish it is simple english. Presently we have our database DB_locale as ISO-8859. We are planning to use UTF-8 so i have set up a test database with UTF-8. I have a couple of questions here. 1. Once after changing the database as UTF-8 do we need to change the codeset to UTF-8 in application also? Or is there anything by default it sends and receives the data as UTF-8 to database? 2. As we thought we should change in the application also, we just changed one jsp page , even normal data was looking funny? Why is that? Again we changed it back ,display was fine in the web. 3. Is there any SQL editor which supports UTF-8 , as i am using Serever Studio , all characters can not be displayed. 4. What needs to be changed either in DB/application to Search for Caf' . Any suggestions ,ideas ..Your help is highly appreciated. Thx in Advance KPai
Hi,
formerly I did some tests with DB_LOCALE=en_us.utf8.
Here are my experiences:
1. Your application must be able to handle Unicode characters. If you
are using Java this is the default.
2. To see special characters on the display you have to set your OS
environment to an appropriate locale.
So you can set LANG to en_us.UTF-8 or Unicode whatever is supported in
your OS.
This will enable dbaccess to display such characters like "'".
3. ServerStudio on Windows works for me. I could insert "Caf'" (by cut
and paste) and display it.
I also tested cyrillic and romanian letters and it worked.
4. I don't know what is wrong with JSP. Because it is also Java based I
expected that it has no problems to display Unicode characters.
You can try to set CLIENT_LOCALE to en_us.utf8 in the JDBC connection
string or as connection property.
5. If you use I-Connect you have to set CLIENT_LOCALE=en_us.utf8.
6. Last but not least: the following files are necessary to work with
UTF-8:
$INFORMIXDIR/gls/lc11/e01c.lco
$INFORMIXDIR/gls/cm3/e01c.cmo
$INFORMIXDIR/gls/cv9/0333e01c.cvo and e01c0333.cvo if you wants to
convert characters from codeset 819 to utf8 and vice versa.
(0xe01c is the hexadecimal code for utf8)
Good Luck,
Marion
Hi marion,
Thanks very much for your valuable reply.
Exactly i did the same way,
set up OS level as utf8 and database DB_LOCALE as utf-8 and in server
studio insted of CLIENT_LOCALE i set DB_LOACLE as en_us.utf8
everything worked fine excpet for few characters like "'" . I can
query from editor and also search from web and all the gls files are
present.
But one thing which i didn't understand is ,we have not chanegd
anything in the header page in application, but it worked fine.
If we chnage the header page as charset= utf-8 some of the chars are
converted to funny.
Please if you could clarify me the above i.e,
1.can we store and retrieve all unicode chars just by changing OS and
database level as utf-8
2. Is it a must to change the header page as UTF-8 or in the jsp page
as conmnection property?
3. Is there a big diff in storage, datatime, sort etc. or any diff's
when you change the db_locale from ISO8859 to en_us.utf8.
Actually i have spent couple of days , it looks to me that no diff
in extent size, rowsize etc. As you r alrady tested on utf-8, if u
have more clues ,any issues, suggestions it would be a great help. As
it is a big risk to migrate clients data in the Produtcion... if
something goes wrong for our bad luck i will be in a big mess.
Once again your help is highly appreciated.
thx again
KPai
Marion Sussujew <marion777@t-online.de> wrote in message news:<cl1amp$s5r$04$1@news.t-online.com>...
> Hi,
>
> formerly I did some tests with DB_LOCALE=en_us.utf8.
>
> Here are my experiences:
>
> 1. Your application must be able to handle Unicode characters. If you
> are using Java this is the default.
>
> 2. To see special characters on the display you have to set your OS
> environment to an appropriate locale.
> So you can set LANG to en_us.UTF-8 or Unicode whatever is supported in
> your OS.
> This will enable dbaccess to display such characters like "'".
>
> 3. ServerStudio on Windows works for me. I could insert "Caf'" (by cut
> and paste) and display it.
> I also tested cyrillic and romanian letters and it worked.
>
> 4. I don't know what is wrong with JSP. Because it is also Java based I
> expected that it has no problems to display Unicode characters.
> You can try to set CLIENT_LOCALE to en_us.utf8 in the JDBC connection
> string or as connection property.
>
> 5. If you use I-Connect you have to set CLIENT_LOCALE=en_us.utf8.
>
> 6. Last but not least: the following files are necessary to work with
> UTF-8:
> $INFORMIXDIR/gls/lc11/e01c.lco
> $INFORMIXDIR/gls/cm3/e01c.cmo
> $INFORMIXDIR/gls/cv9/0333e01c.cvo and e01c0333.cvo if you wants to
> convert characters from codeset 819 to utf8 and vice versa.
> (0xe01c is the hexadecimal code for utf8)
>
> Good Luck,
> Marion