Code: Alles auswählen
procedure TForm1.FormCreate(Sender: TObject);
begin
Caption := FloatToStr(123.456);
end;
Code: Alles auswählen
LANG="de_DE.UTF8" ./project1 # Punkt
Code: Alles auswählen
ANG="de_DE.UTF8" wine project1.exe # Komma
Code: Alles auswählen
#include <stdio.h>
#include <locale.h>
#include <time.h>
int main(void)
{
time_t currtime;
struct tm *timer;
char buffer[80];
time( &currtime );
timer = localtime( &currtime );
printf("\nsetlocale: %s\n", setlocale(LC_ALL, ""));
strftime(buffer,80,"%c", timer );
printf("Float: %f Date: %s\n\n", 123.456, buffer) ;
return 0;
}
Code: Alles auswählen
echo
echo ======== Linux ========
echo
rm main
gcc -o main main.c
LANG="de_CH.UTF8" ./main # Punkt
LANG="de_DE.UTF8" ./main # Komma
LANG="en_US.UTF8" ./main # Punkt
LANG="en_GB.UTF8" ./main # Punkt
echo
echo ======== Windows ========
echo
rm main.exe
x86_64-w64-mingw32-gcc main.c -o main.exe
LANG="de_CH.UTF8" wine main.exe # Punkt
LANG="de_DE.UTF8" wine main.exe # Komma
LANG="en_US.UTF8" wine main.exe # Punkt
LANG="en_GB.UTF8" wine main.exe # Punkt