[Opensource] character sets
Mike Traum
mtraum at cirnetwork.org
Thu Aug 29 14:26:10 PDT 2002
It seems to me that your about there to get Korean working as well (I
haven't done this, though). All you would seem to need to do is to use the
Unicode character set instead of windows-1251 (the cyrrilic set). Resulting
in:
url="jdbc:mysql://localhost:3306/intersoftpro?useUnicode=true&characterE
ncoding=UTF-8" connectFormat="1" login="xxxx" password="xxxx"
and
<%@ page language="java" contentType="text/html;
charset=UTF-8" %>
Please let me know if this works, as I'll have to deal with this soon.
Thanks,
Mike
-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com]On Behalf Of Ivan Ivanov
Sent: Friday, August 23, 2002 10:16 AM
To: opensource at jcorporate.com
Subject: Re: [Opensource] character sets
Hello Mike,
my name is Ivan Ivanov and I work in a small software
firm in Bulagaria. Some months ago we faced almost the
same problem: how to write to a mySQL database using
cyrrilic character sets. It took us a lot of time to
find a good working solution for when we thought we
eventually found a universal solution it proved to
work on Windows platforms and not work on Linux (for
example). However, we made it this way: if we want to
store things in cyrillic our database should be
informed about what charset will be these things and
we modified expresso-config.xml in this way:
<jdbc driver="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost:3306/intersoftpro?useUnicode=true&characterE
ncoding=windows-1251"
connectFormat="1" login="xxxx" password="xxxx"
cache="y"/>
Any character encoding that is supported by JVM will
be accepted.
I think that this does not need explanation. However,
this was only half of the work for we needed to dispay
stuff from database in our jsp's. Of course, we only
had to set
<%@ page language="java" contentType="text/html;
charset=windows-1251" %> and the things went
flawlessly. Almost. The next problem was that things
from MessagesBundles.properties were displayed
correctly (either with question marks or with
unreadable symbols). I was ready to tackle this
priblem but time was pressing and I choose to use
native2ascii tool from jdk and transformed text in
MessagesBundle.properties into pure Unicode. And
finally everything was correct.
My main troble is: aren't there an easier and more
correct way in localizing an expresso app. Now we can
to display and store info in Bulagarian(and/or English
of course) everything will be ok, but if i want to
store things in Bulagarian and Korean(for example)the
problem will arise again. Moreover, the next project
of the same type is knocking at the door.
As you can see many questions remained without answer.
As we tackled the problem we saw that making
multilangual sites is neither only Java nor only
Expresso problem. The root of this i18n evil (mainly
for eastern european programmers) is the 8-bit ASCII
code. More exactly the problem is how to translate the
8-bit ASCII stream of user input to the correct
Unicode Characters.
I really want to make a unversal and
everywhere-working solution of i18n problem but for
the time being I just want to know whether the things
that we have made are goog and aren't there better?
Moreover, this turned to be rather long message and i
do not want to waste your time with my hypothesis.
Thank you very much for your attention, Mike.
Ivan
--- Michael Rimov <rimovm at centercomp.com> wrote:
> At 04:23 PM 8/21/2002 +0300, you wrote:
>
> >Please, would You be able to answer me such a
> question. I want to use
> >Expresso to write to an Oracle database using
> cyrrilic character sets.
> >So I am interested to know which are the supported
> character sets in
> >Expresso 4.02.
> >I am especilly interested in am I able to use
> cp1251, I tryed to do it
> >but it caused me problems starting expresso, so I
> suppose it is not
> >supported.
> >Thank You, Maria
>
> Maria,
>
> Nobody has actually tackled Cryllic charactersets
> yet, although since at
> least one person uses Big-5, I'm SURE it's possible.
> The first thing that
> has to be changed is the charset= from ISO-8859-1 to
> value in
> MessagesBundle.properties to CP1251. Then you'll
> need to create a class:
>
com.jcorporate.expresso.core.security.filters.CP1251.java
> that's similar to
> the ISO_8859_1.java class. [You should be able to
> copy and paste most of it]
>
> I don't know how well Expresso will play with cp1251
> charactersets as far
> as creating it with Oracle as far as DBCreate is
> concerned.
>
> The Expresso English messages bundle would have to
> be translated of
> course... so there would be work to get it done, but
> we'd certainly include
> Russian work into CVS!
>
> HTH!
>
> -Mike
>
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
>
http://mail.jcorporate.com/mailman/listinfo/opensource
> Archives:
http://mail.jcorporate.com/pipermail/opensource/
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/
More information about the Opensource
mailing list