vMix Forums
»
General
»
General Discussion
»
Bug? Datasource CSV parsed goes wrong
Rank: Member
Groups: Registered
Joined: 6/5/2019(UTC) Posts: 29 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
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/18/2014(UTC) Posts: 1,838 Location: Stockholm
Thanks: 144 times Was thanked: 297 time(s) in 250 post(s)
|
check your decimal points, some are . and some are ,
|
|
|
|
Rank: Member
Groups: Registered
Joined: 6/5/2019(UTC) Posts: 29 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
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,289 Location: Belgium Thanks: 296 times Was thanked: 967 time(s) in 801 post(s)
|
|
|
|
|
Rank: Member
Groups: Registered
Joined: 6/5/2019(UTC) Posts: 29 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
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,289 Location: Belgium Thanks: 296 times Was thanked: 967 time(s) in 801 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!
|
|
|
|
Rank: Member
Groups: Registered
Joined: 6/5/2019(UTC) Posts: 29 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
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,289 Location: Belgium Thanks: 296 times Was thanked: 967 time(s) in 801 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 )
|
|
|
|
Rank: Member
Groups: Registered
Joined: 6/5/2019(UTC) Posts: 29 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 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!). should ever be 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
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,289 Location: Belgium Thanks: 296 times Was thanked: 967 time(s) in 801 post(s)
|
Not disagreeing with you !
maybe a feature request would be in order, quicker way of pointing this out to the admin/developer
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Bug? Datasource CSV parsed goes wrong
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.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close