Issue 112874 - Format is not compatible with CSng/Cdbl in Finnish locale/space separator
Summary: Format is not compatible with CSng/Cdbl in Finnish locale/space separator
Status: ACCEPTED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P4 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-02 10:24 UTC by Risto Jääskeläinen
Modified: 2017-05-20 11:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Risto Jääskeläinen 2010-07-02 10:24:43 UTC
I made some testing with numbers and Format function etc.

Observation: Format and CSng functions are not working together in Finnish
locale if number is over 1000 (with thousand separator) but result is error
message when Standard format number string is the parameter of CSng function.

Function Cdbl behaves quite same as CSng.

Related problems:
Issue 70236
Issue 78144
Issue 21413

Observed difference here is that it occur also in Windows so it may be new case
or may not.  A space as the separator seems to be key issue?

Regards
Risto

PS. Here below is Basic macro testing program with results as (second) comments.
Removing (first) comment you can test with other lines. I test also CLng
function and it gives interesting results too.
RJ. 

REM  *****  BASIC  *****

Sub Main
REM testataan erottimia (ja ÀÀkkösiÀ)
DIM vLuku as Variant
vLuku = Format(1234.5,"Standard")
	
REM Ubuntu 10.04
'Inputbox("Kopioi","Testi",   CSng(vLuku))		'Quite same as simple Print, but
more easy to copy results

				'Locale->	 English - USA			Finnish					German (Germany)	
Print CSng(vLuku)			'1234					...type mismatch.		1234
'Print CSng("123.5")		'123					...type mismatch.		1235
'Print CSng("123,5")		'1235					123						123
'Print CSng("123 5")		'...type mismatch.	...type mismatch.		...type mismatch.
'Print CLng(vLuku)			'1						1						1
'Print CLng("123 5")		'123					123						123
'Print CLng("123,5")		'123					123						123
'Print CLng("123.5")		'123					123						123

REM Vista m82
'Inputbox("Kopioi","Testi",  Csng("123 5"))		'Tästä saa kopioitua sen, mitä
Print esittää näytölle

				'Locale->	 English - USA			Finnish					German (Germany)	
'Print CSng(vLuku)			'1234.5					...type mismatch.		1234,5
'Print CSng("123.5")		'123.5					...type mismatch.		1235
'Print CSng("123,5")		'1235					123,5					123,5
'Print CSng("123 5")		'...type mismatch.	...type mismatch.		...type mismatch.

End Sub
Comment 1 kay.ramme 2010-07-06 12:10:21 UTC
Andrease, please have a look.
Comment 2 ab 2010-11-04 14:34:07 UTC
STARTED
Comment 3 Marcus 2017-05-20 11:29:32 UTC
Reset assigne to the default "issues@openoffice.apache.org".