Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Apache, Lighttpd, nginx, Cherokee
Post Reply
michael_d
Posts: 15
Joined: 2004-01-11 19:24
 

Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by michael_d »

Hallo Community,

ich habe ein kleines Problem und zwar folgendes. In meinen Scripten wird eine Zahl so dargestellt 1,023.0

Jedoch möchte ich das das Tausenderzeichen ein Punkt ist und die Kommastelle wirklich ein Komma ist also 1.023,0

Ich weiß es ist eine Newbie Frage aber jeder fängt mal klein an ;)
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by Joe User »

Wie sieht Dein ENV (LC_* und LANG) aus?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
michael_d
Posts: 15
Joined: 2004-01-11 19:24
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by michael_d »

Joe User wrote:Wie sieht Dein ENV (LC_* und LANG) aus?
Verzeihst du mir wenn ich sage ich verstehe nur Bahnhof ?
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by Roger Wilco »

Michael_D wrote:
Joe User wrote:Wie sieht Dein ENV (LC_* und LANG) aus?
Verzeihst du mir wenn ich sage ich verstehe nur Bahnhof ?
Was gibt `locale` aus?
michael_d
Posts: 15
Joined: 2004-01-11 19:24
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by michael_d »

LANG=
LC_CTYPE=de_DE@euro
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
sledge0303
Posts: 695
Joined: 2005-09-16 00:06
Location: Berlin-Reinickendorf
Contact:
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by sledge0303 »

Michael_D wrote:LANG=
LC_CTYPE=de_DE@euro
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
Bei mir steht unter LANG=de_DE@euro
Ã?ndere das mal entsprechend und dann dürfte es wie gewünscht funktionieren

S.
michael_d
Posts: 15
Joined: 2004-01-11 19:24
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by michael_d »

Und wieder eine " dumme " Frage wo ( Datei ) / Wie ändere ich dies ?

OS ist SUSE 9.1
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by Joe User »

/etc/sysconfig/language oder per YaST.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
michael_d
Posts: 15
Joined: 2004-01-11 19:24
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by michael_d »

Ich komme nicht weiter. Egal was ich auswähle das Ergebnis bleibt das selbe:

Code: Select all

## Path:	System/Environment/Language
## Description:	
## Type:	string(POSIX,ca_ES.ISO-8859-1,ca_ES.UTF-8,cs_CZ.ISO-8859-2,cs_CZ.UTF-8,da_DE@euro,da_DK.ISO-8859-1,da_DK.UTF-8,de_DE@euro,de_DE.ISO-8859-1,de_DE.UTF-8,el_GR.ISO-8859-7,el_GR.UTF-8,en_GB.ISO-8859-1,en_GB.UTF-8,en_IE@euro,en_IE.ISO-8859-1,en_US.ISO-8859-1,es_ES@euro,es_ES.ISO-8859-1,es_ES.UTF-8,fr_FR@euro,fr_FR.ISO-8859-1,fr_FR.UTF-8,gl_ES@euro,gl_ES.ISO-8859-1,gl_ES.utf-8,hr_HR.ISO-8859-2,hu_HU.ISO-8859-2,hu_HU.UTF-8,it_IT@euro,it_IT.ISO-8859-1,it_IT.UTF-8,ja_JP.eucJP,ja_JP.UTF-8,lt_LT.ISO-8859-13,lt_LT.UTF-8,nl_NL@euro,nl_NL.ISO-8859-1,nl_NL.UTF-8,ru_RU.ISO-8859-5,ru_RU.KOI8R,ru_RU.UTF-8,sk_SK.ISO-8859-2,sk_SK.UTF-8,tr_TR.ISO-8859-9,tr_TR.UTF-8,ko_KR.eucKR,ko_KR.UTF-8,zh_TW.Big5,zh_TW.UTF-8,zh_CN.GB2312,zh_CN.UTF-8)
## Default:	""
## Config:      OpenOffice.org,groff,ispell,kde,kdm3,profiles,susehelp,susewm,tetex,wdm
#
#
# Local users will get RC_LANG as their default language, i.e. the
# environment variable $LANG . $LANG is the default of all $LC_*-variables,
# as long as $LC_ALL is not set, which overrides all $LC_-variables.
# Root uses this variable only if ROOT_USES_LANG is set to "yes".
#
RC_LANG="de_DE@euro"

## Type:	string
## Default:	""
#
# This variable will override all LC-variables!!
# Again, ROOT_USES_LANG must be set to "yes", if an effect on the superuser
# account is desired.
#
RC_LC_ALL="de_DE@euro"

## Type:	string
## Default:	""
#
# This defines the locale in which messages of programs and
# libraries with i18n-support should appear if a translated
# message catalog for the library or the program is installed.
# This also provides localized yes/no answers.
#
RC_LC_MESSAGES=""

## Type:	string
## Default:	""
#
# This defines the locale for character handling and classification.
# The libc uses this value in language dependent function calls, such
# as e.g. uppercase/lowercase mapping of foreign characters.
#
RC_LC_CTYPE=""

## Type:	string
## Default:	""
#
# This defines the locale for sorting strings and characters.
# It is used by the libc to obtain the alphabetical order of characters
# (e.g. for string comparisons).
#
RC_LC_COLLATE=""

## Type:	string
## Default:	""
#
# This defines the locale for date and time output formats.
# i.e.: 06/09/1999 vs. 09.06.1999
#
RC_LC_TIME=""

## Type:	string
## Default:	""
#
# This defines the locale for formatting and reading numbers.
# i.e.: 1,234.56 vs. 1.234,56
#
RC_LC_NUMERIC=""

## Type:	string
## Default:	""
#
# This defines the locale for formatting and reading money values.
#
RC_LC_MONETARY=""

## Type:	string(ctype)
## Default:	ctype
#
# This defines if the user "root" should use the locale settings
# which are defined here.
# Value "ctype" means that root uses just LC_CTYPE. 
#
ROOT_USES_LANG="ctype"

## Type:        yesno
## Default:     no
#
# Workaround for missing forward of LANG and LC variables
# of e.g. ssh login connections.
#
AUTO_DETECT_UTF8="no"
Ergebnis:

LANG=
LC_CTYPE="de_DE@euro"
LC_NUMERIC="de_DE@euro"
LC_TIME="de_DE@euro"
LC_COLLATE="de_DE@euro"
LC_MONETARY="de_DE@euro"
LC_MESSAGES="de_DE@euro"
LC_PAPER="de_DE@euro"
LC_NAME="de_DE@euro"
LC_ADDRESS="de_DE@euro"
LC_TELEPHONE="de_DE@euro"
LC_MEASUREMENT="de_DE@euro"
LC_IDENTIFICATION="de_DE@euro"
LC_ALL=de_DE@euro
Last edited by michael_d on 2005-10-04 16:39, edited 1 time in total.
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: Trennzeichen für Tausenderzahlen ( Komma statt Punkt )

Post by oxygen »

Statt die Server Konfiguration zu verändern würde ich eher das Script anpassen (So läuft es dann auch auf anderen Servern richtig). z.B. so (PHP):

Code: Select all

setlocale (LC_ALL, 'de_DE');
Allerdings kann das ganz auch Probleme mit MySQL nach sich ziehen wenn man z.B. in einem Query 10,4 statt 10.4 steht...
Post Reply