logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
xun  
#1 Posted : Monday, November 18, 2019 10:26:24 AM(UTC)
xun

Rank: Member

Groups: Registered
Joined: 6/5/2019(UTC)
Posts: 29
Germany

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Code:
"col1","col2","col3","col4"
"1.1","1,1","1.0","1,0"


This CSV results in

col1: 1,1
col2: 11
col3: 1
col4: 10

but, i need it as

col1: 1.1
col2: 1,1
col3: 1.0
col4: 1,0



JimJim
XUN
richardgatarski  
#2 Posted : Monday, November 18, 2019 7:03:09 PM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,811
Location: Stockholm

Thanks: 137 times
Was thanked: 292 time(s) in 246 post(s)
check your decimal points, some are . and some are ,
xun  
#3 Posted : Monday, November 18, 2019 7:18:30 PM(UTC)
xun

Rank: Member

Groups: Registered
Joined: 6/5/2019(UTC)
Posts: 29
Germany

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Oh sorry. I forgot to tell what i need .. (i have edit my post)


JimJim
XUN
doggy  
#4 Posted : Monday, November 18, 2019 7:32:48 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
is normal

see the numerous post regarding this in this forum

is also depending on your language settings

also check out https://forums.vmix.com/...-Number-Format#post68503
xun  
#5 Posted : Monday, November 18, 2019 9:07:26 PM(UTC)
xun

Rank: Member

Groups: Registered
Joined: 6/5/2019(UTC)
Posts: 29
Germany

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Well .. the RFC describes double quotes as "text" and not a number ... https://tools.ietf.org/html/rfc4180 -> 2.6

so .. the parser works not rfc conform ... and, a comma it not language depending. Doublequot encapsulated text should be as it is else dquotes not need :/



JimJim
XUN
doggy  
#6 Posted : Monday, November 18, 2019 9:15:39 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
and what happens when you load the csv into Excel or OpenOffice Calc?

oh ... for displaying decimals, commas and periods ARE language setting dependent!
xun  
#7 Posted : Monday, November 18, 2019 9:43:02 PM(UTC)
xun

Rank: Member

Groups: Registered
Joined: 6/5/2019(UTC)
Posts: 29
Germany

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
well ... this is not excel .. its vmix!

and, if i want to show the remaining time of a game then the "clock/shotclock" bounce around if the time is "x.0" .. thats extreamly bad!

u can see here:
(1:33:15)


JimJim
XUN
doggy  
#8 Posted : Monday, November 18, 2019 10:39:04 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Regardless off..Its good practice to format data properly especially with decimals and times(stopwatches) before being displayed (even the font) no matter the source to avoid displaysurprises IMO

Quote:
Code:
Dim a as string
Dim b as Decimal

a  = Input.Find("TextHD.xaml").Text("Message") 

Decimal.TryParse(a, b) 
a = b.ToString("###.00")

API.Function("SetText",Input:="mytitle",SelectedName:="TextHD.xaml",Value:=a )
xun  
#9 Posted : Monday, November 18, 2019 11:01:57 PM(UTC)
xun

Rank: Member

Groups: Registered
Joined: 6/5/2019(UTC)
Posts: 29
Germany

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
sorry, but a good practice is to NOT manipulate incoming data!

If i input "A" then it must be a "A" and not a "a" or other else
Or, if i input " A " then its good to be a " A " and not trimmed to a "A"

The same is for numbers if it is inside of a string block (doublequoted)

It,s ok if a csv looks like

Code:
1,1.0,1.1


and the result is
Code:
1
1
1.1 or 1,1 (depending on the system-language)


but a string is a fixed and not manipulatable data element (That's why DQoutes exists!).
Code:
" A", " 1", "1.0"

should ever be
Code:
 A
 1
1.0


If this elementary rule will not state of the art, then i can't thrust incoming and outgoing data of a parse-process or any dataset i put into a title-data-source. The Result will be a "maybe" value!


JimJim
XUN
doggy  
#10 Posted : Monday, November 18, 2019 11:06:57 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,057
Belgium
Location: Belgium

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Not disagreeing with you !

maybe a feature request would be in order, quicker way of pointing this out to the admin/developer
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.