Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Bug in: format('%n',[double_number])
Downloads
Daily Snapshots
FAQ
Wiki
Bugtracker
IRC channel
Developer Blog
Follow us on Twitter
Mailing List
Free pascal
Other languages
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Lazarus, the complete guide
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: Bug in: format('%n',[double_number]) (Read 1260 times)
krexon
Jr. Member
Posts: 57
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: 2450
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}
//-Patches are always welcome at patch (at) dommelstein.net (please put the word "patch" in the subject)
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the
bug tracker
krexon
Jr. Member
Posts: 57
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: 2450
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}
//-Patches are always welcome at patch (at) dommelstein.net (please put the word "patch" in the subject)
//-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])
Recent
TDBEdit can't keep its va...
by
dr4cul453xy
[
Today
at 09:10:32 am]
[SOLVED] Stream newb - si...
by
BigChimp
[
Today
at 08:41:43 am]
LDAP, objectsid is there ...
by
BigChimp
[
Today
at 08:41:17 am]
Get list of drives
by
ludob
[
Today
at 08:26:26 am]
FPC 2.6.0 released!
by
MikeFinch
[
Today
at 01:00:43 am]
Custom Draw Controls miss...
by
lainz
[February 10, 2012, 11:30:47 pm]
TTogglebox color
by
Switcher
[February 10, 2012, 11:00:39 pm]
SSH DLL (w-putty-cd) coul...
by
ludob
[February 10, 2012, 05:48:02 pm]
TCDButtom select dsAndroi...
by
wcleyton
[February 10, 2012, 05:47:36 pm]
POCKET PC 2002 ERROR WITH...
by
delphiturk
[February 10, 2012, 03:20:20 pm]