You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by BalNagendra <ba...@gmail.com> on 2015/02/13 13:04:32 UTC

Derby with Indic UTF8 languages

Hi,

I am writing an Indic Application which uses Sanskrit, Hindi and Telugu as
languages. It is supported by UTF-8. When I am trying to insert these rows
in Derby everything gets '?' out. After tooling around with some, I realized
maybe it is Windows cmd.com problem. So I upgraded to Console2 which is
showing these characters well. But still whatever I am inserting is coming
back as '?'. 

<http://apache-database.10148.n7.nabble.com/file/n143790/Indic.jpg> 

Is there something wrong I am trying:

1. I learnt somewhere that Derby supports only these following languages,
Indic is not one of them. Elsewhere it is written it can support any
language which Java UNICODE has support for. I tested my Java program and it
is displaying Indic well. So what is wrong.

<http://apache-database.10148.n7.nabble.com/file/n143790/DerbySupportedLanguages.jpg> 

I am using Derby 10.11 on Windows XP and java 1.7.

Thanks in advance.



--
View this message in context: http://apache-database.10148.n7.nabble.com/Derby-with-Indic-UTF8-languages-tp143790.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Derby with Indic UTF8 languages

Posted by BalNagendra <ba...@gmail.com>.
Hi,

I did not use any special configuration. Default Derby is capable of storing
UTF8. I did not need any timezone, date and currency formats, hence
configuration files were also not needed. Just take care that character set
you are using is installed with Windows. Notepad++, Squirrel SQL as Derby
Client was enough. Squirrel SQL is easy to configure to access Derby.
Nothing much is required besides JDBC setup.

Thanks and regards

Bala Nagendra



--
View this message in context: http://apache-database.10148.n7.nabble.com/Derby-with-Indic-UTF8-languages-tp143790p143842.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Re: Derby with Indic UTF8 languages

Posted by dhayasinfo <dh...@gmail.com>.
Hi I am also facing same issue to display UTF8 code, let me know how do you
configure this setup.
pls share me your experience.



--
View this message in context: http://apache-database.10148.n7.nabble.com/Derby-with-Indic-UTF8-languages-tp143790p143838.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Re: Derby with Indic UTF8 languages

Posted by BalNagendra <ba...@gmail.com>.
Thanks for your help, I am able to solve this problem.

Actually, there was no setup or configuration changes. 

It was just the tooling issue. As you mentioned ij is not able to handle
outside ASCII such as UTF. I needed to use Squirrel SQL Client which did the
job. 

<http://apache-database.10148.n7.nabble.com/file/n143831/alpha.jpg> 

Derby DB is capable of storing UTF. It was the front end which needed to
understand UTF.

Thanks for the help.





--
View this message in context: http://apache-database.10148.n7.nabble.com/Derby-with-Indic-UTF8-languages-tp143790p143831.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Re: Derby with Indic UTF8 languages

Posted by Me <m....@gmail.com>.

Sent from my iPhone

> On Feb 13, 2015, at 9:16 PM, BalNagendra <ba...@gmail.com> wrote:
> 
> Thanks Mike,
> 
> So, there should not be any problem in Derby storing the Indic data. It is
> only the messages at ij level are not supported in Indic languages. 

Hi,

The Derby error messages and things like helptext have been translated in a  few languages (not the ones you are working with). 

The ? Characters you saw is the representation of your non-ascii data (not messages) in ij, and would be the same with any java program unless you specify what locale and language to use for the display. You can tell ij what locale and language you are working in using 'properties' and it will display those characters correctly, as long as supporting language files are available on the OS (which is probably ok in your case). Look in the derby tools guide for further details on how to do that, Mike posted a link to the on-line manual for your version. Search e.g. For 'locale'or 'language'.

HTH,
Myrna

Re: Derby with Indic UTF8 languages

Posted by BalNagendra <ba...@gmail.com>.
Thanks Mike,

So, there should not be any problem in Derby storing the Indic data. It is
only the messages at ij level are not supported in Indic languages. That is
okay, it would not stop my work.

Thanks again for a quick response.

regards

Bala Nagendra



--
View this message in context: http://apache-database.10148.n7.nabble.com/Derby-with-Indic-UTF8-languages-tp143790p143794.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Re: Derby with Indic UTF8 languages

Posted by mike matrigali <mi...@gmail.com>.
On 2/13/2015 4:04 AM, BalNagendra wrote:
> Hi,
>
> I am writing an Indic Application which uses Sanskrit, Hindi and Telugu as
> languages. It is supported by UTF-8. When I am trying to insert these rows
> in Derby everything gets '?' out. After tooling around with some, I realized
> maybe it is Windows cmd.com problem. So I upgraded to Console2 which is
> showing these characters well. But still whatever I am inserting is coming
> back as '?'.
>
> <http://apache-database.10148.n7.nabble.com/file/n143790/Indic.jpg>
>
> Is there something wrong I am trying:
>
> 1. I learnt somewhere that Derby supports only these following languages,
> Indic is not one of them. Elsewhere it is written it can support any
> language which Java UNICODE has support for. I tested my Java program and it
> is displaying Indic well. So what is wrong.
>
> <http://apache-database.10148.n7.nabble.com/file/n143790/DerbySupportedLanguages.jpg>
>
> I am using Derby 10.11 on Windows XP and java 1.7.
>
> Thanks in advance.
>
>
>
> --
> View this message in context: http://apache-database.10148.n7.nabble.com/Derby-with-Indic-UTF8-languages-tp143790.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>
This is likely a tools issue, rather than a database issue.  As noted the Derby database can store any
string that is unicode.  What you may be seeing is an issue with "ij" displaying the result.  Given that
in your example ij is printing english prompts it is likely interpreting the returned string as english and
since it is not can't print it.

See the following about using derby tools and language and codeset issues:
http://db.apache.org/derby/docs/10.11/tools/derbytools.pdf

Derby does have a limited number of languages that various messages can be printed in, so it is unlikely
that will work for you.

I don't have much experience with non-english environments, but can verify that derby should have
have no problems storing and retrieving any unicode based string.

Maybe try writing a simple java/jdbc program rather than use ij and see if that gives you results as you expect.