Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Bug in: format('%n',[double_number])
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TChart: +32% Processor lo...
by
Thaddy
[
Today
at 05:09:52 pm]
CompareText improvement
by
Stefan Glienke
[
Today
at 05:07:58 pm]
An ASCII logo for Pascal ...
by
Fred vS
[
Today
at 03:34:59 pm]
Setup landmap - databse
by
WimVan
[
Today
at 03:31:15 pm]
Improvement of packages/f...
by
lagprogramming
[
Today
at 03:12:57 pm]
[SOLVED] SysTraIcon event...
by
SWM1
[
Today
at 02:40:47 pm]
pdfium.dll loadfromfile f...
by
domasz
[
Today
at 02:14:41 pm]
[SOLVED] Timer
by
Pe3s
[
Today
at 12:36:33 pm]
QT5 PageControl Tab sizes
by
zeljko
[
Today
at 12:07:55 pm]
[ SOLVED ] Json parse pro...
by
superc
[
Today
at 11:58:37 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Bug in: format('%n',[double_number]) (Read 4100 times)
krexon
Jr. Member
Posts: 80
Bug in: format('%n',[double_number])
«
on:
August 05, 2010, 10:21:02 am »
Command:
Code:
[Select]
format('%n',[123456789.01])
should give '123 456 789.01', bu gives '123?456?789,01' (question marks instead of spaces)
Is it a bug, because in Delphi everything is OK
I use 0.9.29 SVN 26989 FPC 2.5.1
Logged
Marc
Administrator
Hero Member
Posts: 2565
Re: Bug in: format('%n',[double_number])
«
Reply #1 on:
August 05, 2010, 11:19:33 am »
By default fpc uses a "nonbreakable space" character for this (it user settable in a fpc variable I forgot). Lazarus uses UTF8 for strings, this space character lies outside the lower ASCII values so it results in a invalid UTF8 character, which gets displayed as ?
Set this variable to space or the UTF8 equivalent of "nonbreakable space"
Logged
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the
bug tracker
krexon
Jr. Member
Posts: 80
Re: Bug in: format('%n',[double_number])
«
Reply #2 on:
August 05, 2010, 12:44:32 pm »
Sorry for stupid question, but where should I change this variable?
EDIT:
I found
Code:
[Select]
ThousandSeparator:=' ';
«
Last Edit: August 05, 2010, 12:47:39 pm by krexon
»
Logged
Marc
Administrator
Hero Member
Posts: 2565
Re: Bug in: format('%n',[double_number])
«
Reply #3 on:
August 06, 2010, 12:29:00 am »
Its not a stupid question, I only knew that there was one, not which
Logged
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the
bug tracker
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Bug in: format('%n',[double_number])
TinyPortal
© 2005-2018