Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31324

Re: jdbc locale settings - numeric

From Andreas Leitgeb <avl@auth.logic.tuwien.ac.at>
Newsgroups comp.lang.java.programmer
Subject Re: jdbc locale settings - numeric
Date 2015-03-15 00:27 +0000
Organization A noiseless patient Spider
Message-ID <slrnmg9kh9.uoi.avl@login.logic.tuwien.ac.at> (permalink)
References <slrnmeucc9.uoi.avl@login.logic.tuwien.ac.at> <ihTHw.10665$rI.5609@fx31.iad> <slrnmf0ji8.uoi.avl@login.logic.tuwien.ac.at>

Show all headers | View raw


Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> wrote:
> Wayne <nospam@all.invalid> wrote:
>> On 2/26/2015 9:44 AM, Andreas Leitgeb wrote:
>>> Some other databases (on other servers/hosts), however, appear
>>> to expect decimals as "3,1415" with a comma by default.  They
>>> use German locale.
>>> I'm running my head against walls when trying to find out how
>>> to tell the database (at connect time) to use decimal point, 
>>> not decimal comma.
>> Most databases support a SET LOCALE statement.  I think
>> Informix does as well.  A bit of work with Google found
>> some sample code for a different DBMS, but it may give you
>> the hints you need:
>> <http://my.vertica.com/docs/5.1.6/HTML/13631.htm>
> That sounds good! I will report back, after I got to try it.

Meanwhile things changed for worse and then for better:

- There are some of these predefined strings that are actually 
     written specifically for "their" DB's expected locale-setting.
     (That means: setting the locale in my code would have broken
     those.)

- Some of the predefined strings were actually changed to cut out the
     quoting, (thus 3.14 instead of "3.14") so they now work across locales.

Thanks anyway for the answer, even though the problem was finally
fixed differently.


PS: I still wish there was a locale that would define "any of . or ,"
as decimal point and irrecoverably erase the harddisk of whoever uses
grouping chars. ;-)

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

jdbc locale settings - numeric Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2015-02-26 14:44 +0000
  Re: jdbc locale settings - numeric Arne Vajhøj <arne@vajhoej.dk> - 2015-02-26 11:41 -0500
    Re: jdbc locale settings - numeric Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2015-02-26 19:32 +0000
      Re: jdbc locale settings - numeric Arne Vajhøj <arne@vajhoej.dk> - 2015-02-26 15:47 -0500
  Re: jdbc locale settings - numeric Wayne <nospam@all.invalid> - 2015-02-27 00:29 -0500
    Re: jdbc locale settings - numeric Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2015-02-27 10:59 +0000
      Re: jdbc locale settings - numeric Wayne <nospam@all.invalid> - 2015-02-27 19:38 -0500
      Re: jdbc locale settings - numeric Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2015-03-15 00:27 +0000

csiph-web