Author |
Topic  |
|
natta
Starting Member
5 Posts |
Posted - 15 Sep 2009 : 09:57:49
|
I have a bug probably due to numeric conventions across countries; it happens with a specific script but I guess it's generic
I uses "mymovies.it script” to grab info such as the movie rating. This is a number which is a single float from 0 to 5 with 2 digit decimals. Such rating is acquired directly from the website. However, the number is truncated to the integer digit, say in stead of a "3,65" rating, it becames just "3" after the script grabs it and send to the DB the single float.
It might be due to the fact that an Italian language website uses "," as a decimal separator and not “.” So the Ex Mv Mgr function called from the script to translate the “rating string” acquired in the HTML to single float DB field is confused by having a "," as a decimal separator unlike english. Hence it probably stops there the conversion.
Is this a known issue ? Any solution ? On a 5 point ratings, decimal are important !! Steve
|
|
JDommi
Administrator
    
Germany
4683 Posts |
Posted - 15 Sep 2009 : 11:06:13
|
Just replace the #RATING# part with this code. It only replaces the decimal comma with a decimal point, if that's the only problem is...
#RATING# #STARTREADWEB# #FINDLINE#=<i>mymonetro</i>#12# #ONERROR#=*STOP* #FIND#=</i>#01# #ONERROR#=*STOP* #FIND#=>#01# #ONERROR#=*STOP* #FIND#=,#02# #ONERROR#=*STOP* #TAKEWORD#=#03#,#01#,#02# #FIND#= stelle#01# #ONERROR#=*STOP* #TAKEWORD#=#04#,#02#,#01# #STRING#=#03#=#03#.#04# #TAKERATING#=#03# #RESTOREMAIN# #ENDRATING#
|
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
 |
|
natta
Starting Member
5 Posts |
Posted - 15 Sep 2009 : 11:40:37
|
quote: Originally posted by JDommi
Just replace the #RATING# part with this code. It only replaces the decimal comma with a decimal point, if that's the only problem is...
Ehy ... JDommi it works !!!! It is now taking the 2 digit decimals ! Perfect. Thanks a lot.
That was the problem. It should be part of the default code mymovies code now :-) Where do I suggesto to make this change change official for Mymoves.txt script ?
Ciao |
 |
|
JDommi
Administrator
    
Germany
4683 Posts |
Posted - 15 Sep 2009 : 11:46:16
|
Just send the updated script to alessioviti@binaryworks.it and he will put it in the updates ;) |
In order to achieve what is possible, you have to try the impossible over and over again. Hermann Hesse |
 |
|
natta
Starting Member
5 Posts |
Posted - 15 Sep 2009 : 15:40:31
|
Done, crediting you. He should upload the new one.
quote: Originally posted by JDommi
Just send the updated script to alessioviti@binaryworks.it and he will put it in the updates ;)
|
 |
|
|
Topic  |
|